|
|
@ -6,6 +6,9 @@ $(document).ready(function () {
|
|
|
|
decode();
|
|
|
|
decode();
|
|
|
|
|
|
|
|
|
|
|
|
function decode() {
|
|
|
|
function decode() {
|
|
|
|
|
|
|
|
if (window.client_moniker == 'PINE') {
|
|
|
|
|
|
|
|
alert('debug:origin redirect:' + window.redirect);
|
|
|
|
|
|
|
|
}
|
|
|
|
var redirect = window.redirect;
|
|
|
|
var redirect = window.redirect;
|
|
|
|
while (redirect.indexOf('://') < 0) {
|
|
|
|
while (redirect.indexOf('://') < 0) {
|
|
|
|
redirect = decodeURIComponent(redirect);
|
|
|
|
redirect = decodeURIComponent(redirect);
|
|
|
@ -14,6 +17,7 @@ $(document).ready(function () {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
window.redirect = redirect;
|
|
|
|
window.redirect = redirect;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var dataCache = {paying: false};
|
|
|
|
var dataCache = {paying: false};
|
|
|
@ -68,6 +72,9 @@ $(document).ready(function () {
|
|
|
|
|
|
|
|
|
|
|
|
function callPayment(tradeNo) {
|
|
|
|
function callPayment(tradeNo) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
if (window.client_moniker == 'PINE') {
|
|
|
|
|
|
|
|
alert('debug:trade no=' + tradeNo)
|
|
|
|
|
|
|
|
}
|
|
|
|
AlipayJSBridge.call('tradePay', {
|
|
|
|
AlipayJSBridge.call('tradePay', {
|
|
|
|
tradeNO: tradeNo
|
|
|
|
tradeNO: tradeNo
|
|
|
|
}, function (res) {
|
|
|
|
}, function (res) {
|
|
|
@ -84,7 +91,7 @@ $(document).ready(function () {
|
|
|
|
location.href = window.redirect + (window.redirect.indexOf('?') < 0 ? '?' : '&') + 'success=true';
|
|
|
|
location.href = window.redirect + (window.redirect.indexOf('?') < 0 ? '?' : '&') + 'success=true';
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
alert(res.memo);
|
|
|
|
alert(res.memo);
|
|
|
|
if(window.tradeNo){
|
|
|
|
if (window.tradeNo) {
|
|
|
|
location.href = window.redirect + (window.redirect.indexOf('?') < 0 ? '?' : '&') + 'success=false';
|
|
|
|
location.href = window.redirect + (window.redirect.indexOf('?') < 0 ? '?' : '&') + 'success=false';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|