From 10a0a6f0ce0e3820fc5021e3a66279cb14684ae7 Mon Sep 17 00:00:00 2001 From: kira <164851225@qq.com> Date: Tue, 18 Sep 2018 10:39:28 +0800 Subject: [PATCH] add rpay --- src/main/ui/static/templates/rpay/v1/payment.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/ui/static/templates/rpay/v1/payment.js b/src/main/ui/static/templates/rpay/v1/payment.js index ba7f27829..74397a9c1 100644 --- a/src/main/ui/static/templates/rpay/v1/payment.js +++ b/src/main/ui/static/templates/rpay/v1/payment.js @@ -267,14 +267,16 @@ $(function () { dataType: 'json', success: function (resp) { window.RPayPlus.send("closeLoading", null, null); - pay(resp,function(data){ - alert(data); if(data == 'success'){ - location.href = '/api/v1.0/rpay/partners/' + window.client_moniker + '/orders/' + pay.order_id + '/result' - }else { + location.href = '/api/v1.0/rpay/partners/' + window.client_moniker + '/orders/' + resp.mch_order_id + '/result' + }else if(data == 'fail'){ alert('Oops,Network fluctuation,please try again later...'); } + $('#key_P').removeClass('hidden'); + $('#key_Loading').addClass('hidden'); + dataCache.paying = false; + }); // if (window.AlipayJSBridge) { // callPayment(); @@ -318,6 +320,8 @@ $(function () { window.RPayPlus.send("closeLoading", null, null); weuiAlert(jqXhr.responseJSON.message); dataCache.paying = false; + $('#key_P').removeClass('hidden'); + $('#key_Loading').addClass('hidden'); } }) });