|
wxPay.config({
apiKey : appId,
mchId : mchId,
partnerKey : partnerKey,
notifyUrl : notifyUrl
}, function(ret, err) {
if (ret.status) {
wxPay.pay({
description : description,
attach : attach,
totalFee : totalFee,
tradeNo : tradeNo,
timeStart : timeStart
}, function(ret, err) {
if (ret.status) {
callback(rets, err)
} else {
if (err.code == "-2") {
sysAlert("用户取消支付!");
} else {
sysAlert("请先打开微信,然后支付");
}
}
})
} else {
sysAlert(err.msg);
}
}); |
|