🎨 兼容旧版退款提现通知解析
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user