update 重试退款接口

This commit is contained in:
2023-08-31 14:55:30 +08:00
parent 58fb45e6dd
commit 8034a73b63

View File

@@ -2972,16 +2972,22 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
// paymentId, refundAmount, wechatAppId, memberId, ScenarioEnum.ORDER.getValue(),
// orderCode);
PaymentReverseOperation operation = new PaymentReverseOperation();
operation.setPaymentId(paymentId);
operation.setReverseAmt(refundAmount);
operation.setMerchantKey(wechatAppId);
operation.setMemberId(memberId);
operation.setScenarioType(ScenarioEnum.ORDER.getValue());
operation.setOrderCode(orderCode);
PaymentReverseResponse response = adapayService.createPaymentReverseRequest(operation);
// PaymentReverseOperation operation = new PaymentReverseOperation();
// operation.setPaymentId(paymentId);
// operation.setReverseAmt(refundAmount);
// operation.setMerchantKey(wechatAppId);
// operation.setMemberId(memberId);
// operation.setScenarioType(ScenarioEnum.ORDER.getValue());
// operation.setOrderCode(orderCode);
// PaymentReverseResponse response = adapayService.createPaymentReverseRequest(operation);
logger.info("重试订单退款response:{}", JSON.toJSONString(response));
ApplyRefundDTO applyRefundDTO = new ApplyRefundDTO();
applyRefundDTO.setOrderCode(orderCode);
applyRefundDTO.setRefundType(Constants.ONE);
applyRefundDTO.setRefundAmount(refundAmount);
applyRefundDTO.setWechatAppId(wechatAppId);
refundOrderWithAdapay(applyRefundDTO);
// logger.info("重试订单退款response:{}", JSON.toJSONString(response));
} else {
BigDecimal reversedAmt = BigDecimal.ZERO;
for (PaymentReverseResponse paymentRevers : paymentReverses) {