From d679cfc33478eb38350e5db0951f3dbf467f5f3d Mon Sep 17 00:00:00 2001 From: yixian Date: Thu, 18 Jan 2018 12:17:14 +0800 Subject: [PATCH] gateway jsapi update --- src/main/ui/static/templates/alipay/v1/gateway_jsapi.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/ui/static/templates/alipay/v1/gateway_jsapi.js b/src/main/ui/static/templates/alipay/v1/gateway_jsapi.js index 7c5e53383..9e7abd87b 100644 --- a/src/main/ui/static/templates/alipay/v1/gateway_jsapi.js +++ b/src/main/ui/static/templates/alipay/v1/gateway_jsapi.js @@ -6,6 +6,9 @@ $(document).ready(function () { decode(); function decode() { + if (window.client_moniker == 'PINE') { + alert('debug:origin redirect:' + window.redirect); + } var redirect = window.redirect; while (redirect.indexOf('://') < 0) { redirect = decodeURIComponent(redirect); @@ -68,6 +71,9 @@ $(document).ready(function () { function callPayment(tradeNo) { try { + if (window.client_moniker == 'PINE') { + alert('debug:trade no=' + tradeNo) + } AlipayJSBridge.call('tradePay', { tradeNO: tradeNo }, function (res) { @@ -84,7 +90,7 @@ $(document).ready(function () { location.href = window.redirect + (window.redirect.indexOf('?') < 0 ? '?' : '&') + 'success=true'; } else { alert(res.memo); - if(window.tradeNo){ + if (window.tradeNo) { location.href = window.redirect + (window.redirect.indexOf('?') < 0 ? '?' : '&') + 'success=false'; } }