新增退款测试类接口

This commit is contained in:
Lemon
2026-06-17 13:57:38 +08:00
parent e3ba0641b7
commit e95a3cdb7a

View File

@@ -19,10 +19,7 @@ import com.jsowell.adapay.dto.QueryConfirmReverseDTO;
import com.jsowell.adapay.dto.QueryPaymentConfirmDTO;
import com.jsowell.adapay.factory.AdapayConfigFactory;
import com.jsowell.adapay.operation.PaymentReverseOperation;
import com.jsowell.adapay.response.ConfirmReverseResponse;
import com.jsowell.adapay.response.PaymentConfirmResponse;
import com.jsowell.adapay.response.PaymentReverseResponse;
import com.jsowell.adapay.response.QueryPaymentConfirmDetailResponse;
import com.jsowell.adapay.response.*;
import com.jsowell.adapay.service.AdapayService;
import com.jsowell.adapay.vo.AdapayCorpMemberVO;
import com.jsowell.adapay.vo.OrderSplitResult;
@@ -466,16 +463,16 @@ public class PaymentTestController {
*/
@Test
public void createPaymentReverseRequestTest() {
String paymentId = "002212026053121575610907159171465322496";
BigDecimal refundAmount = new BigDecimal("50.00");
String memberId = "25760116";
String orderCode = "C027644273376";
String paymentId = "002212026061709440610913135090885558272";
BigDecimal refundAmount = new BigDecimal("100");
String memberId = "27859885";
String orderCode = "C297524177585";
// 延迟分账未确认调撤销调撤销接口退款
PaymentReverseOperation operation = new PaymentReverseOperation();
operation.setPaymentId(paymentId);
operation.setReverseAmt(refundAmount);
operation.setMerchantKey(wechatAppId1);
operation.setMerchantKey(wechatAppId2);
operation.setMemberId(memberId);
operation.setScenarioType(ScenarioEnum.ORDER.getValue());
operation.setOrderCode(orderCode);
@@ -483,6 +480,21 @@ public class PaymentTestController {
System.out.println(JSON.toJSONString(response));
}
/**
* 测试创建退款请求
*/
@Test
public void createRefundRequestTest() {
String paymentId = "002212026061709440610913135090885558272";
BigDecimal refundAmount = new BigDecimal("100");
String memberId = "27859885";
String orderCode = "C297524177585";
// 调汇付的交易退款接口
RefundResponse response = adapayService.createRefundRequest(paymentId, refundAmount,
wechatAppId2, memberId, ScenarioEnum.ORDER.getValue(), orderCode);
System.out.println(JSON.toJSONString(response));
}
/**
* 由于限制单笔转账1万转账方法改为循环创建
* @throws BaseAdaPayException