master
kira 6 years ago
parent 43ab6507d6
commit 10a0a6f0ce

@ -267,14 +267,16 @@ $(function () {
dataType: 'json', dataType: 'json',
success: function (resp) { success: function (resp) {
window.RPayPlus.send("closeLoading", null, null); window.RPayPlus.send("closeLoading", null, null);
pay(resp,function(data){ pay(resp,function(data){
alert(data);
if(data == 'success'){ if(data == 'success'){
location.href = '/api/v1.0/rpay/partners/' + window.client_moniker + '/orders/' + pay.order_id + '/result' location.href = '/api/v1.0/rpay/partners/' + window.client_moniker + '/orders/' + resp.mch_order_id + '/result'
}else { }else if(data == 'fail'){
alert('Oops,Network fluctuation,please try again later...'); alert('Oops,Network fluctuation,please try again later...');
} }
$('#key_P').removeClass('hidden');
$('#key_Loading').addClass('hidden');
dataCache.paying = false;
}); });
// if (window.AlipayJSBridge) { // if (window.AlipayJSBridge) {
// callPayment(); // callPayment();
@ -318,6 +320,8 @@ $(function () {
window.RPayPlus.send("closeLoading", null, null); window.RPayPlus.send("closeLoading", null, null);
weuiAlert(jqXhr.responseJSON.message); weuiAlert(jqXhr.responseJSON.message);
dataCache.paying = false; dataCache.paying = false;
$('#key_P').removeClass('hidden');
$('#key_Loading').addClass('hidden');
} }
}) })
}); });

Loading…
Cancel
Save