Merge branch 'develop'

master
taylor.dang 6 years ago
commit 336b1101f4

@ -580,7 +580,7 @@
* <li>7: RoyalPay 商户静态码(已停用)</li> * <li>7: RoyalPay 商户静态码(已停用)</li>
* <li>8: H5网关</li> * <li>8: H5网关</li>
* </ul> * </ul>
* @apiSuccess (transactions) {String} channel 支付渠道 Alipay|支付宝Wechat|微信Bestpay|翼支付 * @apiSuccess (transactions) {String} channel 支付渠道 Alipay|支付宝AlipayOnline|支付宝线上Wechat|微信Bestpay|翼支付
* @apiSuccess (transactions) {String} type 流水类型 * @apiSuccess (transactions) {String} type 流水类型
* <ul> * <ul>
* <li>Credit: 入账</li> * <li>Credit: 入账</li>
@ -642,7 +642,7 @@
* <li>7: RoyalPay 商户静态码(已停用)</li> * <li>7: RoyalPay 商户静态码(已停用)</li>
* <li>8: H5网关</li> * <li>8: H5网关</li>
* </ul> * </ul>
* @apiSuccess (transactions) {String} channel 支付渠道 Alipay|支付宝Wechat|微信Bestpay|翼支付 * @apiSuccess (transactions) {String} channel 支付渠道 Alipay|支付宝AlipayOnline|支付宝线上Wechat|微信Bestpay|翼支付
* @apiSuccess (transactions) {String} type 流水类型 * @apiSuccess (transactions) {String} type 流水类型
* <ul> * <ul>
* <li>Credit: 入账</li> * <li>Credit: 入账</li>
@ -682,7 +682,7 @@
* @apiParam (JSON) {int} real_fee 支付金额单位是最小货币单位 * @apiParam (JSON) {int} real_fee 支付金额单位是最小货币单位
* @apiParam (JSON) {Double} rate 交易时使用的汇率1AUD=?CNY * @apiParam (JSON) {Double} rate 交易时使用的汇率1AUD=?CNY
* @apiParam (JSON) {String} currency 币种AUD * @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} create_time 订单创建时间格式为'yyyy-MM-dd HH:mm:ss'GMT+10
* @apiParam (JSON) {String} pay_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>7: RoyalPay Static Merchant QRCode(deprecated)</li>
* <li>8: H5 Payment Gateway</li> * <li>8: H5 Payment Gateway</li>
* </ul> * </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 * @apiSuccess (transactions) {String} type Trade Direction
* <ul> * <ul>
* <li>Credit: Income</li> * <li>Credit: Income</li>
@ -653,7 +653,7 @@
* <li>7: RoyalPay Static Merchant QRCode(deprecated)</li> * <li>7: RoyalPay Static Merchant QRCode(deprecated)</li>
* <li>8: H5 Payment Gateway</li> * <li>8: H5 Payment Gateway</li>
* </ul> * </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 * @apiSuccess (transactions) {String} type Trade Direction
* <ul> * <ul>
* <li>Credit: Income</li> * <li>Credit: Income</li>
@ -693,7 +693,7 @@
* @apiParam (JSON) {int} real_fee Actual paid amount * @apiParam (JSON) {int} real_fee Actual paid amount
* @apiParam (JSON) {Double} rate Exchange Rate used while trading. 1AUD=?CNY * @apiParam (JSON) {Double} rate Exchange Rate used while trading. 1AUD=?CNY
* @apiParam (JSON) {String} currency Currency,AUD * @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} 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. * @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) { if (window.disable_ws) {
setTimeout(checkStatus, 3000); 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() { function checkStatus() {
$.ajax({ $.ajax({
url: 'status', 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