🎨 #3532 【微信支付】修复支付通知回调解析方法报错的问题

This commit is contained in:
yangmengyu2021 2025-03-23 20:07:01 +08:00 committed by GitHub
parent 5604a16ae8
commit b225afbd68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -323,14 +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());
this.switchover(result.getMchId(), result.getAppid());
if (result.getSignType() != null) {
// 如果解析的通知对象中signType有值则使用它进行验签
signType = result.getSignType();
} else if (configMap.get(configKey).getSignType() != null) {
} else if (this.getConfig().getSignType() != null) {
// 如果配置中signType有值则使用它进行验签
signType = configMap.get(configKey).getSignType();
this.switchover(result.getMchId(), result.getAppid());
signType = this.getConfig().getSignType();
}
}