Commit 1d19023a authored by zhuxiao's avatar zhuxiao
Browse files

修复微信app调起支付签名串错误问题

parent a37dc48c
...@@ -136,7 +136,7 @@ public class WxpayV3Util { ...@@ -136,7 +136,7 @@ public class WxpayV3Util {
String packageValue = "Sign=WXPay"; String packageValue = "Sign=WXPay";
// 此map用于客户端与微信服务器交互 // 此map用于客户端与微信服务器交互
String beforeSign = String.format("%s\n%s\n%s\n%s\n", wxAppId, timestamp, nonceStr, "prepay_id=" + prepayId); String beforeSign = String.format("%s\n%s\n%s\n%s\n", wxAppId, timestamp, nonceStr, prepayId);
payInfo.put("sign", SignUtils.sign(beforeSign, PemUtils.loadPrivateKey(new FileInputStream(wxPayConfig.getPrivateKeyPath())))); payInfo.put("sign", SignUtils.sign(beforeSign, PemUtils.loadPrivateKey(new FileInputStream(wxPayConfig.getPrivateKeyPath()))));
payInfo.put("prepayId", prepayId); payInfo.put("prepayId", prepayId);
payInfo.put("partnerId", partnerId); payInfo.put("partnerId", partnerId);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment