Skip to content

Commit

Permalink
Upgrade SDKv12.37 (#62)
Browse files Browse the repository at this point in the history
* Committing xsd changes for v12.35, v12.36 and v12.37.

* Committing xsd changes for v12.37.

* Committing test changes for v12.37.

* Committing Batch test cases and CHANGELOG for V12.37

* Committing CHANGELOG for V12.37

---------

Co-authored-by: sghadage <[email protected]>
  • Loading branch information
SushamaGhadage0310 and Sushamaghadage123 authored May 29, 2024
1 parent 534341e commit a6a1d02
Show file tree
Hide file tree
Showing 21 changed files with 1,013 additions and 34 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
= Vantiv eCommerce CNP CHANGELOG

==Version 12.37.0 (v12.37.0)(May 29, 2024)
* Change: [cnpAPI v12.37] New existing 'postCheckoutRedirectUrl' with min length '1' and maxlength '200'
* Change: [cnpAPI v12.37] New enum 'provider' is added with value 'AFFIRM'
* Change: [cnpAPI v12.37] New complex type 'inquiryResultType' is added with simple element 'response' of 'responseType' and 'message' of 'messageType'.
* Change: [cnpAPI v12.37] New complex element 'BNPLAuthorizationRequest' is added with added with few simple elements and few complex elements- simple elements 'amount','orderId' ,'provider' of type 'provider' and complex elements 'customerInfo','billToAddress','shipToAddress','enhancedData','postCheckoutRedirectUrl'
* Change: [cnpAPI v12.37] New complex element 'BNPLAuthResponse' is added with few simple elements ,existing simple elements 'cnpTxnId','response','responseTime','message','location' and 'checkoutUrl'
* Change: [cnpAPI v12.37] New complex element 'BNPLCaptureRequest' is added with existing simple element 'amount','orderId','cnpTxnId'
* Change: [cnpAPI v12.37] New complex element 'BNPLCaptureResponse' is added with existing simple element 'cnpTxnId','response','responseTime','message','location'
* Change: [cnpAPI v12.37] New complex element 'BNPLRefundRequest' is added with existing simple element 'amount','orderId','cnpTxnId'
* Change: [cnpAPI v12.37] New complex element 'BNPLRefundResponse' is added with existing simple element 'cnpTxnId','response','responseTime','message','location'
* Change: [cnpAPI v12.37] New complex element 'BNPLCancelRequest' is added with existing simple element 'amount','orderId','cnpTxnId'
* Change: [cnpAPI v12.37] New complex element 'BNPLCancelResponse' is added with existing simple element 'cnpTxnId','response','responseTime','message','location'
* Change: [cnpAPI v12.37] New complex element 'BNPLInquiryRequest' is added with existing simple element 'orderId','cnpTxnId'
* Change: [cnpAPI v12.37] New complex element 'BNPLInquiryResponse' is added with existing simple element 'cnpTxnId','response','responseTime','message','location' and complex element 'inquiryResult' of 'inquiryResultType'
* Change: [cnpAPI v12.36] new Enum is added 'accountFundingTransactionTypeEnum' with new values 'accountToAccount','agentCashOut','bankInitiated','businessDisbursement','businessToBusinessTransfer','debitPrepaidAccount','fundsDisbursement','fundTransfer','governmentNonProfitDisbursement','paymentOfOwnCreditCardBill','payrollDisbursement','personToPerson','personToPersonCardAccount','rapidMerchantSettlement','topUp','walletTransfer'
* Change: [cnpAPI v12.36] new Enum is added 'accountFundingTransactionAccountNumberTypeEnum' with new values 'other','RTNAndBAN','IBAN','cardAccount','email','phoneNumber','BANAndBIC','walletID','socialNetworkID'
* Change: [cnpAPI v12.36] New complex 'finicityAccountRequest' element is added with simple element 'echeckCustomerId' of type 'string25Type'
* Change: [cnpAPI v12.36] New complex 'finicityAccountResponse' element is added with simple elements 'cnpTxnId','response','responseTime','message','location' and new complex element 'finicityAccount' of type 'finicityAccountInfoType'
* Change: [cnpAPI v12.36] To support 'finicityAccount' new complex type 'finicityAccountInfoType' is added with simple element accountId' of 'string','accType' of type 'echeckAccountTypeEnum','realAccNum' of 'echeckAccountNumberType','routingNum' of 'routingNumberType'
* Change: [cnpAPI v12.36] new element 'fraudCheckAction' of 'fraudCheckActionEnum' is added in Authorization, sale request.
* Change: [cnpAPI v12.36] New values added 'APPROVED_SKIP_FRAUD_CHECK','DECLINED_NEED_FRAUD_CHECK' to existing 'fraudCheckActionEnum'
* Change: [cnpAPI v12.36] New simple element 'accountId' of type 'string' is added in 'echeckType' existing complex type.
* Change: [cnpAPI v12.36] new simple elements are added in existing complex element accountFundingTransactionData,'receiverAccountNumberType' of 'accountFundingTransactionAccountNumberTypeEnum' and 'accountFundingTransactionType' of 'accountFundingTransactionTypeEnum'
* Change: [cnpAPI v12.35] In existing Enum businessIndicatorEnum new values 'personToPersonCardAccount','debitPrepaidAccount','paymentOfOwnCreditCardBill','businessDisbursement','businessToBusinessTransfer','governmentNonProfitDisbursement','rapidMerchantSettlement','agentCashOut' are added.
* Change: [cnpAPI v12.35] New Enum 'stateTypeEnum' is added with values 'AL','AK','AZ','AR','CA','CO','CT','DE','DC','FL','GA','HI','ID','IL','IN','IA','KS','KY','LA','ME','MD','MA','MI','MN','MS','MO','MT','NE','NV','NH','NJ','NM','NY','NC','ND','OH','OK','OR','PA','RI','SC','SD','TN','TX','UT','VT','VA','WA','WV','WI','WY','AB','BC','MB','NB','NL','NT','NS','ON','PE','QC','SK','YT','NU'
* Change: [cnpAPI v12.35] In existing Enum fulfilmentMethodTypeEnum new values 'STANDARD_SHIPPING' and 'EXPEDITED_SHIPPING'
* Change: [cnpAPI v12.35] In existing Enum orderChannelEnum new values 'SCAN_AND_GO' and 'SMART_TV'
* Change: [cnpAPI v12.35] New complex element 'accountFundingTransactionData' added with below simple elements receiverFirstName of 'string35Type' ,'receiverLastName' of 'string35Type','receiverState' of 'stateTypeEnum',''receiverCountry' of 'countryTypeEnum' and 'receiverAccountNumber' of 'string50Type'
* Change: [cnpAPI v12.35] 'accountFundingTransactionData' is added in Authorization,sale,credit,capturegiventAuth and FORCECapture request.

==Version 12.34.1 (v12.34.1)(May 6, 2024)
* Change: cnp-sdk-for-java is upgraded to work with Java 17.

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIST_DIR_15=build/dist/java15
JAR_VERSION=12.34.1
JAR_VERSION=12.37.0
KIT_DIR=build/kit/java15
KIT_DEPENDENCIES_DIR=build/kit/java15/dependencies
OPENSFTP_DIR=lib/opensftp-0.3.0
SCHEMA_VERSION=12.34
SCHEMA_VERSION=12.37
56 changes: 56 additions & 0 deletions src/functionalTest/java/io/github/vantiv/sdk/TestAuth.java
Original file line number Diff line number Diff line change
Expand Up @@ -1048,4 +1048,60 @@ public void simpleAuthWithBusinessIndcatorEnum() throws Exception {
assertEquals("sandbox", response.getLocation());
}

@Test
public void simpleAuthWithBusinessIndcatorFor12_37() throws Exception {
Authorization authorization = new Authorization();
authorization.setReportGroup("Planets");
authorization.setOrderId("12344");
authorization.setAmount(106L);
authorization.setOrderSource(OrderSourceType.ECOMMERCE);
authorization.setId("id");
CardType card = new CardType();
card.setType(MethodOfPaymentTypeEnum.VI);
card.setNumber("4100000000000000");
card.setExpDate("1210");
authorization.setCard(card);
EnhancedData enhanced = new EnhancedData();
enhanced.setCustomerReference("Cust Ref");
enhanced.setSalesTax(1000L);
LineItemData lid = new LineItemData();
lid.setItemSequenceNumber(1);
lid.setItemDescription("Electronics");
lid.setProductCode("El01");
lid.setItemCategory("Ele Appiances");
lid.setItemSubCategory("home appliaces");
lid.setProductId("1001");
lid.setProductName("dryer");
Subscription sub = new Subscription();
sub.setSubscriptionId("123");
sub.setCurrentPeriod(BigInteger.valueOf(1));
sub.setPeriodUnit("YEAR");
sub.setNumberOfPeriods(BigInteger.valueOf(2));
sub.setCurrentPeriod(BigInteger.valueOf(3));
sub.setNextDeliveryDate(Calendar.getInstance());
lid.setShipmentId("456");
lid.setSubscription(sub);
enhanced.getLineItemDatas().add(lid);
enhanced.setDiscountCode("oneTimeDis");
enhanced.setDiscountPercent(BigInteger.valueOf(12));
enhanced.setFulfilmentMethodType(FulfilmentMethodTypeEnum.STANDARD_SHIPPING);
authorization.setEnhancedData(enhanced);
authorization.setOrderChannel(OrderChannelEnum.SMART_TV);
authorization.setBusinessIndicator(BusinessIndicatorEnum.RAPID_MERCHANT_SETTLEMENT);
AccountFundingTransactionData accountFundingTransactionData= new AccountFundingTransactionData();
accountFundingTransactionData.setReceiverAccountNumber("12345");
accountFundingTransactionData.setReceiverCountry(CountryTypeEnum.AD);
accountFundingTransactionData.setReceiverFirstName("abc");
accountFundingTransactionData.setReceiverState(StateTypeEnum.AK);
accountFundingTransactionData.setReceiverLastName("def");
accountFundingTransactionData.setReceiverAccountNumberType(AccountFundingTransactionAccountNumberTypeEnum.BAN_AND_BIC);
accountFundingTransactionData.setAccountFundingTransactionType(AccountFundingTransactionTypeEnum.ACCOUNT_TO_ACCOUNT);
authorization.setAccountFundingTransactionData(accountFundingTransactionData);
authorization.setFraudCheckAction(FraudCheckActionEnum.DECLINED_NEED_FRAUD_CHECK);
AuthorizationResponse response = cnp.authorize(authorization);
assertEquals(response.getMessage(), "000",response.getResponse());
assertEquals("Approved", response.getMessage());
assertEquals("sandbox", response.getLocation());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
package io.github.vantiv.sdk;

import static org.junit.Assert.assertEquals;

import java.util.Calendar;

import org.junit.BeforeClass;
import org.junit.Test;

import io.github.vantiv.sdk.generate.BNPLAuthResponse;
import io.github.vantiv.sdk.generate.BNPLAuthorizationRequest;
import io.github.vantiv.sdk.generate.Contact;
import io.github.vantiv.sdk.generate.CustomerInfo;
import io.github.vantiv.sdk.generate.DetailTax;
import io.github.vantiv.sdk.generate.EnhancedData;
import io.github.vantiv.sdk.generate.FinicityAccountRequest;
import io.github.vantiv.sdk.generate.FinicityAccountResponse;
import io.github.vantiv.sdk.generate.Provider;

public class TestBNPLAuthorizationRequest {

private static CnpOnline cnp;

@BeforeClass
public static void beforeClass() throws Exception {
cnp = new CnpOnline();
}


@Test
public void testSimpleBNPLAuthReqeust() throws Exception {
BNPLAuthorizationRequest bnplAuthorizationRequest = new BNPLAuthorizationRequest();
bnplAuthorizationRequest.setId("url1");
bnplAuthorizationRequest.setReportGroup("XML10Mer1");
bnplAuthorizationRequest.setCustomerId("154646587");
bnplAuthorizationRequest.setAmount(106L);
bnplAuthorizationRequest.setProvider(Provider.AFFIRM);
bnplAuthorizationRequest.setOrderId("abc");
bnplAuthorizationRequest.setPostCheckoutRedirectUrl("www.abc");
CustomerInfo cust = new CustomerInfo();
cust.setAccountUsername("Woolfoo");
cust.setUserAccountNumber("123456ATY");
cust.setUserAccountEmail("[email protected]");
cust.setMembershipId("Member01");
cust.setMembershipPhone("9765431234");
cust.setMembershipEmail("[email protected]");
cust.setMembershipName("memName");
Calendar createDate = Calendar.getInstance();
createDate.set(1990, Calendar.MARCH, 16);
cust.setAccountCreatedDate(createDate);
cust.setUserAccountPhone("123456789");
bnplAuthorizationRequest.setCustomerInfo(cust);
Contact contact = new Contact();
contact.setZip("95032");
bnplAuthorizationRequest.setBillToAddress(contact);
bnplAuthorizationRequest.setShipToAddress(contact);
EnhancedData enhanced = new EnhancedData();
DetailTax dt1 = new DetailTax();
dt1.setTaxAmount(100L);
enhanced.getDetailTaxes().add(dt1);
DetailTax dt2 = new DetailTax();
dt2.setTaxAmount(200L);
enhanced.getDetailTaxes().add(dt2);
bnplAuthorizationRequest.setEnhancedData(enhanced);
BNPLAuthResponse response = cnp.bnplAuth(bnplAuthorizationRequest);
assertEquals(response.getMessage(), "000",response.getResponse());
assertEquals("Approved", response.getMessage());
assertEquals("sandbox", response.getLocation());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package io.github.vantiv.sdk;

import static org.junit.Assert.assertEquals;

import org.junit.BeforeClass;
import org.junit.Test;

import io.github.vantiv.sdk.generate.BNPLCancelRequest;
import io.github.vantiv.sdk.generate.BNPLCancelResponse;
import io.github.vantiv.sdk.generate.BNPLCaptureRequest;
import io.github.vantiv.sdk.generate.BNPLCaptureResponse;

public class TestBNPLCancleRequest {

private static CnpOnline cnp;

@BeforeClass
public static void beforeClass() throws Exception {
cnp = new CnpOnline();
}


@Test
public void testSimpleBNPLCancleReqeust() throws Exception {
BNPLCancelRequest bnplCancelRequest = new BNPLCancelRequest();
bnplCancelRequest.setId("url1");
bnplCancelRequest.setReportGroup("XML10Mer1");
bnplCancelRequest.setCustomerId("154646587");
bnplCancelRequest.setAmount(106L);
bnplCancelRequest.setOrderId("abc");
bnplCancelRequest.setCnpTxnId(106l);
BNPLCancelResponse response = cnp.bnplCancle(bnplCancelRequest);
assertEquals(response.getMessage(), "000",response.getResponse());
assertEquals("Approved", response.getMessage());
assertEquals("sandbox", response.getLocation());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package io.github.vantiv.sdk;

import static org.junit.Assert.assertEquals;

import java.util.Calendar;

import org.junit.BeforeClass;
import org.junit.Test;

import io.github.vantiv.sdk.generate.BNPLAuthResponse;
import io.github.vantiv.sdk.generate.BNPLAuthorizationRequest;
import io.github.vantiv.sdk.generate.BNPLCaptureRequest;
import io.github.vantiv.sdk.generate.BNPLCaptureResponse;
import io.github.vantiv.sdk.generate.Contact;
import io.github.vantiv.sdk.generate.CustomerInfo;
import io.github.vantiv.sdk.generate.DetailTax;
import io.github.vantiv.sdk.generate.EnhancedData;
import io.github.vantiv.sdk.generate.Provider;

public class TestBNPLCaptureRequest {

private static CnpOnline cnp;

@BeforeClass
public static void beforeClass() throws Exception {
cnp = new CnpOnline();
}


@Test
public void testSimpleBNPLCaptureReqeust() throws Exception {
BNPLCaptureRequest bnplCaptureRequest = new BNPLCaptureRequest();
bnplCaptureRequest.setId("url1");
bnplCaptureRequest.setReportGroup("XML10Mer1");
bnplCaptureRequest.setCustomerId("154646587");
bnplCaptureRequest.setAmount(106L);
bnplCaptureRequest.setOrderId("abc");
bnplCaptureRequest.setCnpTxnId(106l);
BNPLCaptureResponse response = cnp.bnplCapture(bnplCaptureRequest);
assertEquals(response.getMessage(), "000",response.getResponse());
assertEquals("Approved", response.getMessage());
assertEquals("sandbox", response.getLocation());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package io.github.vantiv.sdk;

import static org.junit.Assert.assertEquals;

import org.junit.BeforeClass;
import org.junit.Test;

import io.github.vantiv.sdk.generate.BNPLCancelRequest;
import io.github.vantiv.sdk.generate.BNPLCancelResponse;
import io.github.vantiv.sdk.generate.BNPLInquiryRequest;
import io.github.vantiv.sdk.generate.BNPLInquiryResponse;

public class TestBNPLInquiryRequest {

private static CnpOnline cnp;

@BeforeClass
public static void beforeClass() throws Exception {
cnp = new CnpOnline();
}


@Test
public void testSimpleBNPLInquiryReqeust() throws Exception {
BNPLInquiryRequest Request = new BNPLInquiryRequest();
Request.setId("url1");
Request.setReportGroup("XML10Mer1");
Request.setCustomerId("154646587");
Request.setOrderId("abc");
Request.setCnpTxnId(106l);
BNPLInquiryResponse response = cnp.bnplInquiry(Request);
assertEquals(response.getMessage(), "000",response.getResponse());
assertEquals("Approved", response.getMessage());
assertEquals("sandbox", response.getLocation());
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package io.github.vantiv.sdk;

import static org.junit.Assert.assertEquals;

import org.junit.BeforeClass;
import org.junit.Test;

import io.github.vantiv.sdk.generate.BNPLCaptureRequest;
import io.github.vantiv.sdk.generate.BNPLCaptureResponse;
import io.github.vantiv.sdk.generate.BNPLRefundRequest;
import io.github.vantiv.sdk.generate.BNPLRefundResponse;

public class TestBNPLRefundRequest {

private static CnpOnline cnp;

@BeforeClass
public static void beforeClass() throws Exception {
cnp = new CnpOnline();
}


@Test
public void testSimpleRefundReqeust() throws Exception {
BNPLRefundRequest bnplRefundRequest = new BNPLRefundRequest();
bnplRefundRequest.setId("url1");
bnplRefundRequest.setReportGroup("XML10Mer1");
bnplRefundRequest.setCustomerId("154646587");
bnplRefundRequest.setAmount(106L);
bnplRefundRequest.setOrderId("abc");
bnplRefundRequest.setCnpTxnId(106L);
BNPLRefundResponse response = cnp.bnplRefund(bnplRefundRequest);
assertEquals(response.getMessage(), "000",response.getResponse());
assertEquals("Approved", response.getMessage());
assertEquals("sandbox", response.getLocation());
}

}
Loading

0 comments on commit a6a1d02

Please sign in to comment.