mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-21 15:49:47 +08:00
新增退款测试类接口
This commit is contained in:
@@ -19,10 +19,7 @@ import com.jsowell.adapay.dto.QueryConfirmReverseDTO;
|
|||||||
import com.jsowell.adapay.dto.QueryPaymentConfirmDTO;
|
import com.jsowell.adapay.dto.QueryPaymentConfirmDTO;
|
||||||
import com.jsowell.adapay.factory.AdapayConfigFactory;
|
import com.jsowell.adapay.factory.AdapayConfigFactory;
|
||||||
import com.jsowell.adapay.operation.PaymentReverseOperation;
|
import com.jsowell.adapay.operation.PaymentReverseOperation;
|
||||||
import com.jsowell.adapay.response.ConfirmReverseResponse;
|
import com.jsowell.adapay.response.*;
|
||||||
import com.jsowell.adapay.response.PaymentConfirmResponse;
|
|
||||||
import com.jsowell.adapay.response.PaymentReverseResponse;
|
|
||||||
import com.jsowell.adapay.response.QueryPaymentConfirmDetailResponse;
|
|
||||||
import com.jsowell.adapay.service.AdapayService;
|
import com.jsowell.adapay.service.AdapayService;
|
||||||
import com.jsowell.adapay.vo.AdapayCorpMemberVO;
|
import com.jsowell.adapay.vo.AdapayCorpMemberVO;
|
||||||
import com.jsowell.adapay.vo.OrderSplitResult;
|
import com.jsowell.adapay.vo.OrderSplitResult;
|
||||||
@@ -466,16 +463,16 @@ public class PaymentTestController {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void createPaymentReverseRequestTest() {
|
public void createPaymentReverseRequestTest() {
|
||||||
String paymentId = "002212026053121575610907159171465322496";
|
String paymentId = "002212026061709440610913135090885558272";
|
||||||
BigDecimal refundAmount = new BigDecimal("50.00");
|
BigDecimal refundAmount = new BigDecimal("100");
|
||||||
String memberId = "25760116";
|
String memberId = "27859885";
|
||||||
String orderCode = "C027644273376";
|
String orderCode = "C297524177585";
|
||||||
|
|
||||||
// 延迟分账未确认调撤销调撤销接口退款
|
// 延迟分账未确认调撤销调撤销接口退款
|
||||||
PaymentReverseOperation operation = new PaymentReverseOperation();
|
PaymentReverseOperation operation = new PaymentReverseOperation();
|
||||||
operation.setPaymentId(paymentId);
|
operation.setPaymentId(paymentId);
|
||||||
operation.setReverseAmt(refundAmount);
|
operation.setReverseAmt(refundAmount);
|
||||||
operation.setMerchantKey(wechatAppId1);
|
operation.setMerchantKey(wechatAppId2);
|
||||||
operation.setMemberId(memberId);
|
operation.setMemberId(memberId);
|
||||||
operation.setScenarioType(ScenarioEnum.ORDER.getValue());
|
operation.setScenarioType(ScenarioEnum.ORDER.getValue());
|
||||||
operation.setOrderCode(orderCode);
|
operation.setOrderCode(orderCode);
|
||||||
@@ -483,6 +480,21 @@ public class PaymentTestController {
|
|||||||
System.out.println(JSON.toJSONString(response));
|
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万,转账方法改为循环创建
|
* 由于限制单笔转账1万,转账方法改为循环创建
|
||||||
* @throws BaseAdaPayException
|
* @throws BaseAdaPayException
|
||||||
|
|||||||
Reference in New Issue
Block a user