1
0
mirror of synced 2026-10-18 05:16:10 +08:00

🎨 兼容旧版退款提现通知解析

This commit is contained in:
Binary Wang
2026-08-18 12:44:36 +08:00
committed by GitHub
parent 2f1aa7bd09
commit 6a4f0db39e
2 changed files with 26 additions and 0 deletions

View File

@@ -532,6 +532,15 @@ public interface EcommerceService {
*/
RefundNotifyResult parseRefundNotifyResult(String notifyData, SignatureHeader header) throws WxPayException;
/**
* @deprecated 从 4.8.5.B 起,请改用使用 {@link SignatureHeader} 的同名方法;5.0 将移除。
*/
@Deprecated
default RefundNotifyResult parseRefundNotifyResult(String notifyData,
com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader header) throws WxPayException {
return parseRefundNotifyResult(notifyData, toUnifiedSignatureHeader(header));
}
/**
* <pre>
* 提现状态变更通知回调数据处理
@@ -545,6 +554,15 @@ public interface EcommerceService {
*/
WithdrawNotifyResult parseWithdrawNotifyResult(String notifyData, SignatureHeader header) throws WxPayException;
/**
* @deprecated 从 4.8.5.B 起,请改用使用 {@link SignatureHeader} 的同名方法;5.0 将移除。
*/
@Deprecated
default WithdrawNotifyResult parseWithdrawNotifyResult(String notifyData,
com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader header) throws WxPayException {
return parseWithdrawNotifyResult(notifyData, toUnifiedSignatureHeader(header));
}
/**
* <pre>
* 二级商户账户余额提现API

View File

@@ -17,4 +17,12 @@ public class LegacyEcommerceApiCompatibilityTest {
Assert.assertNotNull(result);
Assert.assertEquals(TradeTypeEnum.JSAPI.name(), "JSAPI");
}
@Test
public void shouldKeepLegacyRefundAndWithdrawNotificationSignatures() throws Exception {
Class<?> legacyHeader = com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader.class;
Assert.assertNotNull(EcommerceService.class.getMethod("parseRefundNotifyResult", String.class, legacyHeader));
Assert.assertNotNull(EcommerceService.class.getMethod("parseWithdrawNotifyResult", String.class, legacyHeader));
}
}