何何
何何
  • 发布:2018-09-26 14:11
  • 更新:2018-09-26 14:11
  • 阅读:4120

微信支付第一次弹出支付页面,取消之后再次支付就不能调起支付了 {

分类:5+ SDK

$.ajax({
type: 'GET',
url: url,
dataType: 'json',
async: false,
data: {},
success: function(result) {
if(id == 'alipay') {
if(result.code == 4) {
//plus.runtime.openURL(result.data);
plus.payment.request(pays[id], result.data, function(result) {
console.log(pays[id]);
console.log(result);
}, function(e) {
console.error(JSON.stringify(e));
})
}
} else if(id == 'wxpay') {
if(result.code == 4) {
var wxurl = result.data;
$.ajax({
type: 'GET',
url: wxurl,
dataType: 'json',
data: {},
success: function(rsp) {
var wxxinxi = {
"sign": rsp.result_data.sign,
"timeStamp": rsp.result_data.timestamp,
"nonceStr": rsp.result_data.noncestr,
"partnerId": rsp.result_data.partnerid,
"prepayId": rsp.result_data.prepayid,
"package": rsp.result_data.package,
"appId": rsp.result_data.appid
};
console.log(JSON.stringify(wxxinxi));
plus.payment.request(pays[id], wxxinxi, function(result) {
console.log(pays[id]);
console.log(result);
}, function(e) {
console.error(JSON.stringify(e));
})
}
})
}
} else {
plus.nativeUI.alert(result.message)
}
}
})

2018-09-26 14:11 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复