支付的逻辑代码
uni.requestPayment({
"provider": "wxpay",
"orderInfo": {
"appid": "wx4a19c0df3df1e717", // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致
"noncestr": resData.nonceStr, // 随机字符串
"package": "Sign=WXPay", // 固定值
"partnerid": resData.merchantId, // 微信支付商户号
"prepayid": resData.pay_data, // 统一下单订单号
"timestamp": resData.timeStamp, // 时间戳(单位:秒)
"sign": resData.paySign // 签名,这里用的 MD5/RSA 签名
},
success(res) {
that.payResult('success');
console.log(res)
},
fail(err) {
console.log(err)
err.errMsg !== 'requestPayment:fail cancel' && that.payResult('fail');
}
})
i***@163.com (作者)
用这个报“请查看是否设备未加入到证书列表或者确认证书类型是否匹配”
2024-10-17 14:38
BoredApe
回复 i***@163.com: 请检查证书类型需要是开发证书。并且是否将测试手机的UDID添加到devices中
2024-10-17 14:53
i***@163.com (作者)
谢谢已经解决了
2024-10-18 09:17
iosStephen
回复 i***@163.com: 哥们怎么解决的
2024-12-18 16:48