扫码支付统一退款单元测试, 修复退款失败,渠道错误未赋值bug

This commit is contained in:
jason
2023-08-17 21:52:53 +08:00
parent d3c02f2a57
commit 6fbf7b261b
3 changed files with 138 additions and 11 deletions

View File

@@ -148,7 +148,7 @@ public abstract class AbstractAlipayPayClient extends AbstractPayClient<AlipayPa
// 2.1 执行请求
AlipayTradeRefundResponse response = client.execute(request);
if (!response.isSuccess()) {
return PayRefundRespDTO.failureOf(reqDTO.getOutRefundNo(), response);
return PayRefundRespDTO.failureOf(response.getSubCode(), response.getSubMsg(), reqDTO.getOutRefundNo(), response);
}
// 2.2 创建返回结果
// 支付宝只要退款调用返回 success就认为退款成功不需要回调。具体可见 parseNotify 方法的说明。