服务器端向微信下单成功后,再次生成签名返回前端时对应参数应该全部小写,小程序的是大写
app支付:
var str = "appid=" + payOrder.appid + "&noncestr=" + randomStr + "&package=Sign=WXPay&partnerid=" + payOrder.mch_id + "&prepayid="
+ payOrder.prepay_id + "×tamp=" + payOrder.timeStamp + "&key=" + config[1];
var sign = CommonCode.Md5Encrypt(str);
小程序支付:
var str = "appId=" + payOrder.appid + "&nonceStr=" + randomStr + "&package=prepay_id=" + payOrder.prepay_id +
"&signType=" + signType + "&timeStamp=" + payOrder.timeStamp + "&key=" + config[1];
var sign = wxPayData.CalcMd5Sign(str);
标签:str,微信,app,id,下单,timeStamp,var,payOrder From: https://www.cnblogs.com/yuany69/p/17108581.html