Merge branch 'develop'

master
taylor.dang 6 years ago
commit 336b1101f4

@ -580,7 +580,7 @@
* <li>7: RoyalPay 商户静态码(已停用)</li>
* <li>8: H5网关</li>
* </ul>
* @apiSuccess (transactions) {String} channel 支付渠道 Alipay|支付宝Wechat|微信Bestpay|翼支付
* @apiSuccess (transactions) {String} channel 支付渠道 Alipay|支付宝AlipayOnline|支付宝线上Wechat|微信Bestpay|翼支付
* @apiSuccess (transactions) {String} type 流水类型
* <ul>
* <li>Credit: 入账</li>
@ -642,7 +642,7 @@
* <li>7: RoyalPay 商户静态码(已停用)</li>
* <li>8: H5网关</li>
* </ul>
* @apiSuccess (transactions) {String} channel 支付渠道 Alipay|支付宝Wechat|微信Bestpay|翼支付
* @apiSuccess (transactions) {String} channel 支付渠道 Alipay|支付宝AlipayOnline|支付宝线上Wechat|微信Bestpay|翼支付
* @apiSuccess (transactions) {String} type 流水类型
* <ul>
* <li>Credit: 入账</li>
@ -682,7 +682,7 @@
* @apiParam (JSON) {int} real_fee 支付金额单位是最小货币单位
* @apiParam (JSON) {Double} rate 交易时使用的汇率1AUD=?CNY
* @apiParam (JSON) {String} currency 币种AUD
* @apiParam (JSON) {String} channel 支付渠道 Alipay|支付宝Wechat|微信Bestpay|翼支付
* @apiParam (JSON) {String} channel 支付渠道 Alipay|支付宝AlipayOnline|支付宝线上Wechat|微信Bestpay|翼支付
* @apiParam (JSON) {String} create_time 订单创建时间格式为'yyyy-MM-dd HH:mm:ss'GMT+10
* @apiParam (JSON) {String} pay_time 订单支付时间格式为'yyyy-MM-dd HH:mm:ss'GMT+10
*

@ -590,7 +590,7 @@
* <li>7: RoyalPay Static Merchant QRCode(deprecated)</li>
* <li>8: H5 Payment Gateway</li>
* </ul>
* @apiSuccess (transactions) {String} channel Payment Channel (Alipay, Wechat, Bestpay)
* @apiSuccess (transactions) {String} channel Payment Channel (Alipay, AlipayOnline, Wechat, Bestpay)
* @apiSuccess (transactions) {String} type Trade Direction
* <ul>
* <li>Credit: Income</li>
@ -653,7 +653,7 @@
* <li>7: RoyalPay Static Merchant QRCode(deprecated)</li>
* <li>8: H5 Payment Gateway</li>
* </ul>
* @apiSuccess (transactions) {String} channel Payment Channel (Alipay, Wechat, Bestpay)
* @apiSuccess (transactions) {String} channel Payment Channel (Alipay, AlipayOnline, Wechat, Bestpay)
* @apiSuccess (transactions) {String} type Trade Direction
* <ul>
* <li>Credit: Income</li>
@ -693,7 +693,7 @@
* @apiParam (JSON) {int} real_fee Actual paid amount
* @apiParam (JSON) {Double} rate Exchange Rate used while trading. 1AUD=?CNY
* @apiParam (JSON) {String} currency Currency,AUD
* @apiParam (JSON) {String} channel Payment Channel AlipayWechatBestpay
* @apiParam (JSON) {String} channel Payment Channel AlipayAlipayOnlineWechatBestpay
* @apiParam (JSON) {String} create_time Time when order is created, which is formatted in 'yyyy-MM-dd HH:mm:ss', UTC+10
* @apiParam (JSON) {String} pay_time Time when order is paid, which is formatted in 'yyyy-MM-dd HH:mm:ss', UTC+10.
*

@ -17,25 +17,7 @@ $(function () {
if (window.disable_ws) {
setTimeout(checkStatus, 3000);
function checkStatus() {
$.ajax({
url: 'status',
method: 'get',
cache: false,
dataType: 'json',
success: function (status) {
if (status.result_code == 'PAY_SUCCESS') {
var concat = '?';
if (window.redirect.indexOf('?') > 0) {
concat = '&';
}
location.href = window.redirect + concat + 'time=' + status.time + '&nonce_str=' + status.nonce_str + '&sign=' + status.sign;
} else {
setTimeout(checkStatus, 3000);
}
}
})
}
} else {
var sock = new SockJS('/register');
@ -49,6 +31,27 @@ $(function () {
}
location.href = window.redirect + concat + 'time=' + json.time + '&nonce_str=' + json.nonce_str + '&sign=' + json.sign;
})
},function () {
setTimeout(checkStatus, 3000);
})
}
function checkStatus() {
$.ajax({
url: 'status',
method: 'get',
cache: false,
dataType: 'json',
success: function (status) {
if (status.result_code == 'PAY_SUCCESS') {
var concat = '?';
if (window.redirect.indexOf('?') > 0) {
concat = '&';
}
location.href = window.redirect + concat + 'time=' + status.time + '&nonce_str=' + status.nonce_str + '&sign=' + status.sign;
} else {
setTimeout(checkStatus, 3000);
}
}
})
}
});
Loading…
Cancel
Save