Skip to content

Commit 5decfcb

Browse files
authored
🎨 #3505【微信支付】修复微信支付异步通知请求解析失败问题
1 parent 44a9557 commit 5decfcb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,13 @@ public WxPayOrderNotifyResult parseOrderNotifyResult(String xmlData, String sign
323323
log.debug("微信支付异步通知请求参数:{}", xmlData);
324324
WxPayOrderNotifyResult result = WxPayOrderNotifyResult.fromXML(xmlData);
325325
if (signType == null) {
326+
String configKey = this.getConfigKey(result.getMchId(), result.getAppid());
326327
if (result.getSignType() != null) {
327328
// 如果解析的通知对象中signType有值,则使用它进行验签
328329
signType = result.getSignType();
329-
} else if (configMap.get(result.getMchId()).getSignType() != null) {
330+
} else if (configMap.get(configKey).getSignType() != null) {
330331
// 如果配置中signType有值,则使用它进行验签
331-
signType = configMap.get(result.getMchId()).getSignType();
332+
signType = configMap.get(configKey).getSignType();
332333
this.switchover(result.getMchId(), result.getAppid());
333334
}
334335
}

0 commit comments

Comments
 (0)