|
[插件使用]
wxPay.payOrder 不报错也不执行
[复制链接]
本帖最后由 半城村落 于 2018-6-21 11:23 编辑
wxPay.payOrder({
apiKey : 'wx96e69a8XXXXXXX',
mchId : '1507412XXX',
orderId: back_info.prepayid,//服务器端的统一下单已经完成。back_info 为返回的数据,我把数据写死也不行
nonceStr: back_info.noncestr,
timeStamp: back_info.timestamp,
package: back_info.package,
sign: back_info.sign
}, function(ret, err) {
console.log(JSON.stringify(ret)); //没有执行
console.log(JSON.stringify(err)); //没有执行
if (ret.status) {
api.ajax({
url : url + "/index.php/Api/V1/alipayrecharge/token/" + token + "/uid/" + userid + "/tradeNO/" + voucher_,
timeout : 30,
dataType : 'json',
returnAll : false,
}, function(ret, err) {
if (ret.retCode == 0) {
api.toast({
msg : '支付成功',
duration : 2000,
location : 'bottom'
});
duqu();
} else {
api.toast({
msg : '提交失败,如已支付请联系管理员',
duration : 2000,
location : 'bottom'
});
}
});
} else {
alert(err.msg); //直接走了这一步,服务器端的统一下单已经完成。
}
});
} else {
alert(err.msg);
} |
|