var appid = res.data.appid;
var timeStamp = (Date.parse(new Date()) / 1000).toString();
var pkg = ‘prepay_id=’ + res.data.prepay_id;
var nonceStr = res.data.nonce_str;
var key = res.data.key;
var paySign = md5.hexMD5(‘appId=’ + appid + ‘&nonceStr=’ + nonceStr + ‘&package=’ + pkg + ‘&signType=MD5&timeStamp=’ + timeStamp + “&key=” + key).toUpperCase();
console.log(‘appId=’ + appid + ‘&nonceStr=’ + nonceStr + ‘&package=’ + pkg + ‘&signType=MD5&timeStamp=’ + timeStamp + “&key=”+key);
console.log(paySign);
wx.requestPayment({
timeStamp: appid,
nonceStr: nonceStr,
package: pkg,
signType: ‘MD5’,
paySign: paySign,
success:function(){
console.log(“支付成功”);
},
fail: function(res){
console.log(“支付失败:”);
console.log(res);
}
});
err_code="-1"
支付验证签名失败
求官方解答!!!!急求