wx.requestPayment、基础库:2.12.2;
wx.requestPayment({
timeStamp: data.payTimeStamp||data.timeStamp,
nonceStr: data.paynonceStr||data.nonceStr,
package: data.payPackage,
signType: data.paySignType||data.signType,
paySign: data.paySign,
success: res => {
console.log(res);
setTimeout(()=>{
wx.showToast({
title: "支付成功!",
icon: 'none',
duration: 3000,
success: res => {
self.add();
}
})
},200);
},
fail: error => {
console.log('error', error)
if(error.errMsg=='requestPayment:fail cancel'){
wx.showModal({
title:'支付失败',
content: '用户已取消支付',
})
}else if(error.errMsg=='requestPayment:fail (detail message)'){
wx.showModal({
title:'支付失败',
content: '支付失败',
})
}
}
})
这个问题是出现在沙盒环境中的,在体验版中,没有出现;目前暂时不能开发下去了,一直用体验版来做,太麻烦,各位可有良方搭救一下,小弟感激不尽