|
@@ -26,15 +26,15 @@ const handlePay = async () => {
|
|
|
const { prepayId, outTradeNo } = await wechatPay({
|
|
const { prepayId, outTradeNo } = await wechatPay({
|
|
|
subjectId: props.record.subjectId,
|
|
subjectId: props.record.subjectId,
|
|
|
})
|
|
})
|
|
|
- const { signature } = await wechatPayRequest({
|
|
|
|
|
|
|
+ const { signature,timestamp,nonceStr } = await wechatPayRequest({
|
|
|
prepayId, outTradeNo
|
|
prepayId, outTradeNo
|
|
|
})
|
|
})
|
|
|
console.log(signature)
|
|
console.log(signature)
|
|
|
uni.requestPayment({
|
|
uni.requestPayment({
|
|
|
provider: "wxpay",
|
|
provider: "wxpay",
|
|
|
- timeStamp: String(new Date().getTime().toString()),
|
|
|
|
|
- nonceStr: outTradeNo,
|
|
|
|
|
- package: prepayId,
|
|
|
|
|
|
|
+ timeStamp: timestamp,
|
|
|
|
|
+ nonceStr: nonceStr,
|
|
|
|
|
+ package: "prepay_id="+prepayId,
|
|
|
paySign: signature,
|
|
paySign: signature,
|
|
|
signType: "RSA",
|
|
signType: "RSA",
|
|
|
success: (res) => {
|
|
success: (res) => {
|