mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-13 11:49:49 +08:00
update
This commit is contained in:
@@ -12,7 +12,6 @@ import com.huifu.adapay.model.Payment;
|
|||||||
import com.jsowell.adapay.common.CreateAdaPaymentParam;
|
import com.jsowell.adapay.common.CreateAdaPaymentParam;
|
||||||
import com.jsowell.adapay.config.AbstractAdapayConfig;
|
import com.jsowell.adapay.config.AbstractAdapayConfig;
|
||||||
import com.jsowell.adapay.factory.AdapayConfigFactory;
|
import com.jsowell.adapay.factory.AdapayConfigFactory;
|
||||||
import com.jsowell.adapay.operation.PaymentReverseOperation;
|
|
||||||
import com.jsowell.adapay.response.PaymentReverseResponse;
|
import com.jsowell.adapay.response.PaymentReverseResponse;
|
||||||
import com.jsowell.common.constant.CacheConstants;
|
import com.jsowell.common.constant.CacheConstants;
|
||||||
import com.jsowell.common.constant.Constants;
|
import com.jsowell.common.constant.Constants;
|
||||||
@@ -631,18 +630,21 @@ public class DelayMerchantOrderLogic extends AbstractOrderLogic {
|
|||||||
throw new BusinessException(ReturnCodeEnum.CODE_REFUND_ORDER_AMOUNT_ERROR);
|
throw new BusinessException(ReturnCodeEnum.CODE_REFUND_ORDER_AMOUNT_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
BigDecimal refundAmt = null; // 交易退款金额
|
// BigDecimal refundAmt = null; // 交易退款金额
|
||||||
// 延迟分账未确认调撤销调撤销接口退款
|
// 延迟分账未确认调撤销调撤销接口退款
|
||||||
PaymentReverseOperation operation = new PaymentReverseOperation();
|
// PaymentReverseOperation operation = new PaymentReverseOperation();
|
||||||
operation.setPaymentId(paymentId);
|
// operation.setPaymentId(paymentId);
|
||||||
operation.setReverseAmt(refundAmount);
|
// operation.setReverseAmt(refundAmount);
|
||||||
operation.setMerchantKey(dto.getWechatAppId());
|
// operation.setMerchantKey(dto.getWechatAppId());
|
||||||
operation.setMemberId(dto.getMemberId());
|
// operation.setMemberId(dto.getMemberId());
|
||||||
operation.setScenarioType(ScenarioEnum.ORDER.getValue());
|
// operation.setScenarioType(ScenarioEnum.ORDER.getValue());
|
||||||
operation.setOrderCode(dto.getOrderCode());
|
// operation.setOrderCode(dto.getOrderCode());
|
||||||
PaymentReverseResponse response = adapayService.createPaymentReverseRequest(operation);
|
// PaymentReverseResponse response = adapayService.createPaymentReverseRequest(operation);
|
||||||
|
PaymentReverseResponse response = adapayService.createPaymentReverseRequest(paymentId, refundAmount,
|
||||||
|
dto.getWechatAppId(), dto.getMemberId(), ScenarioEnum.ORDER.getValue(), dto.getOrderCode());
|
||||||
if (response != null && response.isNotFailed()) {
|
if (response != null && response.isNotFailed()) {
|
||||||
refundAmt = new BigDecimal(response.getReverse_amt());
|
// 交易退款金额
|
||||||
|
BigDecimal refundAmt = new BigDecimal(response.getReverse_amt());
|
||||||
memberAdapayRecordService.updateRefundAmountFromFreezeAmount(paymentId, refundAmt);
|
memberAdapayRecordService.updateRefundAmountFromFreezeAmount(paymentId, refundAmt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user