requestPluginPayment发起调用,拉起支付功能页之后,点击支付一直报订单已过期,
// 插件内支付调用
wx.requestPluginPayment({
version: 'develop',
fee: 1,
paymentArgs: {
timeStamp: "1701853617",
nonceStr: "4a0726bb511e493d93ff1f28e1df9f0f",
package: "prepay_id=wx06170657836361933fdfaa88381a2f0000",
signType: 'RSA',
paySign: "myOu9pxNWGoaPunIcBWqlPKFuAWeBP2HC66vyK+nISynunQtqMwfMhLTfu8SnN1P4dlxGmAFQFo1vtFTYszhU7CW6B/kohJckfZ7gDX75ON/j3nzzy7bbhkJ+KsNcqaluJ9dDHlFYJC3j+fBp0RoXQJKEeGTgp5qcLZSSnRDXYLcCgp4IMsxt9j6HDmdaLzKO4m9dI6bPcS1ZeogC9CUmxVQtewdkIS3Vk5GaDVmZZbjYwroBDKfPVn5kKqQ9bzcGiZEaSPUisKPd/P1cHr+JsQ2bEWnOb/ViuOIsaxl/uhVjl3RH3fpLM7w+DvNXhC5JO59ohU23ch/pSUaOOsa6g==",
},
currencyType: 'CNY',
success (res) {
console.log(res)
},
fail (res) {
console.log(res);
}
})
宿主小程序的支付功能页函数
exports.beforeRequestPayment = function (paymentArgs, callback) {
console.log('paymentArgs',paymentArgs);
var requestPaymentArgs = {
timeStamp: paymentArgs.timeStamp,
nonceStr: paymentArgs.nonceStr,
package: paymentArgs.package,
signType: paymentArgs.signType,
paySign: paymentArgs.paySign,
};
callback(null, requestPaymentArgs)
//
}
ddiao
timeStamp: "1701853617", nonceStr: "4a0726bb511e493d93ff1f28e1df9f0f", package: "prepay_id=wx06170657836361933fdfaa88381a2f0000",
不应该都是实时获取的吗?