|
6 | 6 | import io.craftgate.model.Currency; |
7 | 7 | import io.craftgate.model.PaymentGroup; |
8 | 8 | import io.craftgate.request.BnplPaymentOfferRequest; |
| 9 | +import io.craftgate.request.BnplLimitInquiryRequest; |
9 | 10 | import io.craftgate.request.InitBnplPaymentRequest; |
10 | 11 | import io.craftgate.request.dto.BnplPaymentCartItem; |
11 | 12 | import io.craftgate.request.dto.PaymentItem; |
12 | | -import io.craftgate.response.BnplPaymentOfferResponse; |
13 | | -import io.craftgate.response.BnplPaymentVerifyResponse; |
14 | | -import io.craftgate.response.InitBnplPaymentResponse; |
15 | | -import io.craftgate.response.PaymentResponse; |
| 13 | +import io.craftgate.response.*; |
16 | 14 | import io.craftgate.response.dto.BnplBankOffer; |
17 | 15 | import org.junit.jupiter.api.Test; |
18 | 16 |
|
@@ -113,6 +111,35 @@ void init_bnpl_payment() { |
113 | 111 | assertNotNull(response.getRedirectUrl()); |
114 | 112 | } |
115 | 113 |
|
| 114 | + @Test |
| 115 | + void init_bnpl_limit_inquiry() { |
| 116 | + BnplLimitInquiryRequest request = BnplLimitInquiryRequest.builder() |
| 117 | + .apmType(ApmType.ZIP) |
| 118 | + .additionalParams(new HashMap<String, Object>() {{ |
| 119 | + put("buyerPhoneNumber", "5320000000"); |
| 120 | + put("buyerIdentityNumber", "11111111110"); |
| 121 | + put("buyerBirthdate", "1990-01-01"); |
| 122 | + }}) |
| 123 | + .build(); |
| 124 | + |
| 125 | + BnplLimitInquiryResponse response = craftgate.payment().bnplLimitInquiryInit(request); |
| 126 | + assertNotNull(response); |
| 127 | + } |
| 128 | + |
| 129 | + @Test |
| 130 | + void complete_bnpl_limit_inquiry() { |
| 131 | + BnplLimitInquiryRequest request = BnplLimitInquiryRequest.builder() |
| 132 | + .apmType(ApmType.ZIP) |
| 133 | + .additionalParams(new HashMap<String, Object>() {{ |
| 134 | + put("buyerPhoneNumber", "5320000000"); |
| 135 | + put("otpCode", "123456"); |
| 136 | + }}) |
| 137 | + .build(); |
| 138 | + |
| 139 | + BnplLimitInquiryResponse response = craftgate.payment().bnplLimitInquiry(request); |
| 140 | + assertNotNull(response); |
| 141 | + } |
| 142 | + |
116 | 143 | @Test |
117 | 144 | void init_tom_finance_bnpl_payment() { |
118 | 145 | BigDecimal price = new BigDecimal("100"); |
|
0 commit comments