🎨 #3505【微信支付】修复微信支付异步通知请求解析失败问题

This commit is contained in:
raven
2025-03-03 15:40:52 +08:00
committed by GitHub
parent 44a95578d9
commit 5decfcb917

View File

@@ -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());
}
}