Skip to content

Commit 452dd58

Browse files
hh891010binarywang
authored andcommitted
🎨 修复H5纯签约签名BUG
1 parent a126c8e commit 452dd58

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxEntrustPapServiceImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public String maSign(WxMaEntrustRequest wxMaEntrustRequest) throws WxPayExceptio
4848
@Override
4949
public WxH5EntrustResult h5Sign(WxH5EntrustRequest wxH5EntrustRequest) throws WxPayException {
5050
wxH5EntrustRequest.checkAndSign(payService.getConfig());
51+
// 微信最新接口signType不能参与签名,否则报错:签约参数签名校验错误
52+
wxH5EntrustRequest.setSignType(null);
5153

5254
String sign = SignUtils.createSign(wxH5EntrustRequest, WxPayConstants.SignType.HMAC_SHA256, payService.getConfig().getMchKey(), null);
5355
/**

0 commit comments

Comments
 (0)