@@ -345,9 +345,10 @@ public WxPayOrderNotifyResult parseOrderNotifyResult(String xmlData, String sign
345
345
if (result .getSignType () != null ) {
346
346
// 如果解析的通知对象中signType有值,则使用它进行验签
347
347
signType = result .getSignType ();
348
- } else if (this . getConfig ( ).getSignType () != null ) {
348
+ } else if (configMap . get ( result . getMchId () ).getSignType () != null ) {
349
349
// 如果配置中signType有值,则使用它进行验签
350
- signType = this .getConfig ().getSignType ();
350
+ signType = configMap .get (result .getMchId ()).getSignType ();
351
+ this .switchover (result .getMchId ());
351
352
}
352
353
}
353
354
@@ -430,6 +431,7 @@ public WxPayRefundNotifyResult parseRefundNotifyResult(String xmlData) throws Wx
430
431
WxPayRefundNotifyResult result ;
431
432
if (XmlConfig .fastMode ) {
432
433
result = BaseWxPayResult .fromXML (xmlData , WxPayRefundNotifyResult .class );
434
+ this .switchover (result .getMchId ());
433
435
result .decryptReqInfo (this .getConfig ().getMchKey ());
434
436
} else {
435
437
result = WxPayRefundNotifyResult .fromXML (xmlData , this .getConfig ().getMchKey ());
@@ -465,12 +467,13 @@ public WxPayRefundNotifyV3Result parseRefundNotifyV3Result(String notifyData, Si
465
467
}
466
468
467
469
@ Override
468
- public WxScanPayNotifyResult parseScanPayNotifyResult (String xmlData , String signType ) throws WxPayException {
470
+ public WxScanPayNotifyResult parseScanPayNotifyResult (String xmlData , @ Deprecated String signType ) throws WxPayException {
469
471
try {
470
472
log .debug ("扫码支付回调通知请求参数:{}" , xmlData );
471
473
WxScanPayNotifyResult result = BaseWxPayResult .fromXML (xmlData , WxScanPayNotifyResult .class );
474
+ this .switchover (result .getMchId ());
472
475
log .debug ("扫码支付回调通知解析后的对象:{}" , result );
473
- result .checkResult (this , signType , false );
476
+ result .checkResult (this , this . getConfig (). getSignType () , false );
474
477
return result ;
475
478
} catch (WxPayException e ) {
476
479
throw e ;
@@ -481,8 +484,8 @@ public WxScanPayNotifyResult parseScanPayNotifyResult(String xmlData, String sig
481
484
482
485
@ Override
483
486
public WxScanPayNotifyResult parseScanPayNotifyResult (String xmlData ) throws WxPayException {
484
- final String signType = this .getConfig ().getSignType ();
485
- return this .parseScanPayNotifyResult (xmlData , signType );
487
+ // final String signType = this.getConfig().getSignType();
488
+ return this .parseScanPayNotifyResult (xmlData , null );
486
489
}
487
490
488
491
@ Override
0 commit comments