Merge branch 'develop'

master
taylor.dang 7 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 Alipay、Wechat、Bestpay
* @apiParam (JSON) {String} channel Payment Channel Alipay、AlipayOnline、Wechat、Bestpay
* @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,6 +17,24 @@ $(function () {
if (window.disable_ws) {
setTimeout(checkStatus, 3000);
} else {
var sock = new SockJS('/register');
var client = Stomp.over(sock);
client.connect({}, function () {
client.subscribe('/app/payment/orders/' + window.order_id, function (msg) {
var json = JSON.parse(msg.body);
var concat = '?';
if (window.redirect.indexOf('?') > 0) {
concat = '&';
}
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',
@ -36,19 +54,4 @@ $(function () {
}
})
}
} else {
var sock = new SockJS('/register');
var client = Stomp.over(sock);
client.connect({}, function () {
client.subscribe('/app/payment/orders/' + window.order_id, function (msg) {
var json = JSON.parse(msg.body);
var concat = '?';
if (window.redirect.indexOf('?') > 0) {
concat = '&';
}
location.href = window.redirect + concat + 'time=' + json.time + '&nonce_str=' + json.nonce_str + '&sign=' + json.sign;
})
})
}
});
Loading…
Cancel
Save