diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java index 1fa2f8dc8..16fa7a799 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java @@ -323,12 +323,13 @@ public abstract class BaseWxPayServiceImpl implements WxPayService { log.debug("微信支付异步通知请求参数:{}", xmlData); WxPayOrderNotifyResult result = WxPayOrderNotifyResult.fromXML(xmlData); if (signType == null) { + String configKey = this.getConfigKey(result.getMchId(), result.getAppid()); if (result.getSignType() != null) { // 如果解析的通知对象中signType有值,则使用它进行验签 signType = result.getSignType(); - } else if (configMap.get(result.getMchId()).getSignType() != null) { + } else if (configMap.get(configKey).getSignType() != null) { // 如果配置中signType有值,则使用它进行验签 - signType = configMap.get(result.getMchId()).getSignType(); + signType = configMap.get(configKey).getSignType(); this.switchover(result.getMchId(), result.getAppid()); } }