mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🐛 #2246 【微信支付】修复微信支付V3签名/验签的换行符错误问题
参考微信支付文档: https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_4.shtml https://pay.weixin.qq.com/wiki/doc/apiv3/wechatpay/wechatpay4_0.shtml 签名时使用的换行符必须是\n,因此不应使用%n,这会导致windows平台下签名错误
This commit is contained in:
@@ -83,7 +83,7 @@ public class WxPayUnifiedOrderV3Result implements Serializable {
|
||||
private String paySign;
|
||||
|
||||
private String getSignStr() {
|
||||
return String.format("%s%n%s%n%s%n%s%n", appId, timeStamp, nonceStr, packageValue);
|
||||
return String.format("%s\n%s\n%s\n%s\n", appId, timeStamp, nonceStr, packageValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user