var timestamp = (Date.parse(new Date()) / 1000).toString();
var a = ‘appId=’ + res.data.appid
-
‘&nonceStr=’ + res.data.nonce_str
-
‘&package=prepay_id=’ + res.data.prepay_id
-
‘&signType=MD5’
-
‘&timeStamp=’ + timestamp
-
‘&key=8e062b0ca08db01e7d3a0b233d80f693’;
var paySign = crypt.hex_md5(a).toUpperCase();
wx.requestPayment({
‘timeStamp’: timestamp,
‘nonceStr’: res.data.nonce_str,
‘package’: ‘prepay_id=’+res.data.prepay_id,
‘signType’: ‘MD5’,
‘paySign’: paySign,
‘success’: function (res) {
console.log(res)
},
‘fail’: function (res) {
console.log(res)
}
})
总是签名失败 ,那校验工具是自己随便填的,和他一样也没用,大佬看看这里面还有什么坑?