This commit is contained in:
Lemon
2023-09-06 09:35:46 +08:00
3 changed files with 38 additions and 18 deletions

View File

@@ -7,7 +7,6 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.huifu.adapay.core.exception.BaseAdaPayException;
import com.jsowell.adapay.dto.QueryPaymentConfirmDTO;
import com.jsowell.adapay.operation.PaymentConfirmOperation;
import com.jsowell.adapay.operation.PaymentReverseOperation;
import com.jsowell.adapay.response.PaymentConfirmResponse;
import com.jsowell.adapay.response.PaymentReverseResponse;
@@ -1435,16 +1434,17 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
BigDecimal deductionAmount = vo.getDeductionAmount();
// 延时分账使用确认交易API
// PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(paymentId, adapayMemberAccount, deductionAmount, orderCode, wechatAppId);
PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(paymentId,
adapayMemberAccount, deductionAmount, orderCode, wechatAppId);
// 换新的方法,逻辑不变,参数封装了
PaymentConfirmOperation operation = new PaymentConfirmOperation();
operation.setPaymentId(paymentId);
operation.setConfirmAmt(deductionAmount);
operation.setOrderCode(orderCode);
operation.setAdapayMemberId(adapayMemberAccount.getAdapayMemberId());
operation.setMerchantKey(wechatAppId);
PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(operation);
// PaymentConfirmOperation operation = new PaymentConfirmOperation();
// operation.setPaymentId(paymentId);
// operation.setConfirmAmt(deductionAmount);
// operation.setOrderCode(orderCode);
// operation.setAdapayMemberId(adapayMemberAccount.getAdapayMemberId());
// operation.setMerchantKey(wechatAppId);
// PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(operation);
if (paymentConfirmResponse != null && paymentConfirmResponse.isNotFailed()) {
confirmAmt = confirmAmt.add(new BigDecimal(paymentConfirmResponse.getConfirm_amt()));
@@ -1566,15 +1566,16 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
BigDecimal settleAmount = orderBasicInfo.getSettleAmount();
// 调汇付的分账接口 确认交易
// PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(paymentId, adapayMemberAccount, settleAmount, orderCode, wechatAppId);
PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(paymentId,
adapayMemberAccount, settleAmount, orderCode, wechatAppId);
PaymentConfirmOperation operation = new PaymentConfirmOperation();
operation.setPaymentId(paymentId);
operation.setConfirmAmt(settleAmount);
operation.setOrderCode(orderCode);
operation.setAdapayMemberId(adapayMemberAccount.getAdapayMemberId());
operation.setMerchantKey(wechatAppId);
PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(operation);
// PaymentConfirmOperation operation = new PaymentConfirmOperation();
// operation.setPaymentId(paymentId);
// operation.setConfirmAmt(settleAmount);
// operation.setOrderCode(orderCode);
// operation.setAdapayMemberId(adapayMemberAccount.getAdapayMemberId());
// operation.setMerchantKey(wechatAppId);
// PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(operation);
// 分账接口返回的信息