CV
代码片段
- 复制粘贴即可用
let data = "后端返回的数据"
wx.getProvider({
service:"payment",
success:res=>{
wx.requestPayment({
"timeStamp":data.timeStamp, //当前时间
"nonceStr":data.nonceStr,
"package":data.packageStr,
"signType":data.signType,
"paySign":data.paySign,
success:sres=>{
console.log('支付成功',res);
},
fail:fres=>{
console.log('支付失败')
}
})
}
})