timeStamp,nonceStr’,package, signType,HMAC-SHA256,paySign 数据都获取到了为什么还是签名错误啊???
求告知
以前是可以的 昨天下载替换最新SDK就出问题了 PHP的
wx.request({
url: base_url + ‘pay/request/wxAppPay.php?oid=’ + oid,
data: { oid: oid },
method: ‘GET’, // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
// header: {}, // 设置请求的 header
success: function (res) {
console.log(res,‘回调’);
// success
wx.requestPayment({
‘timeStamp’: res.data.timeStamp,
‘nonceStr’: res.data.nonceStr,
‘package’: res.data.package,
‘signType’: ‘HMAC-SHA256’,
‘paySign’: res.data.paySign,
‘success’: function (res) {
wx.showToast({
title: ‘支付成功’,
icon: ‘success’,
duration: 2000
});
setTimeout(function () {
that.setData({ current: 1, list: [] })
page = 1;
render(that);
}, 2000);
},
‘fail’: function (res) {
console.log(res);
},
‘complete’: function (res) {
// console.log(res);
}
});
},
fail: function (res) {
// fail
// console.log(res);
},
complete: function (res) {
// complete
}
})