Skip to content

Commit

Permalink
Merge pull request #7 from Vantiv/US270048_12.10_Upgrade
Browse files Browse the repository at this point in the history
Us270048 12.10 upgrade
  • Loading branch information
VantivSDK authored Oct 22, 2019
2 parents 8bb4758 + 6e38509 commit 90a940d
Show file tree
Hide file tree
Showing 15 changed files with 207 additions and 156 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
= Vantiv eCommerce CNP CHANGELOG

==Version 12.10.0 (October 22, 2019)
* Feature: Added skipRealtimeAU support to authorization and sale
* Feature: Added support for accountUpdateSource and numAccountUpdates in responses

==Version 12.9.0 (October 22, 2019)
* Feature: Added support for customerCredit, customerDebit
* Feature: Added support for payoutOrgCredit , payoutOrgDebit
* Feature: Added support for customerCredit, customerDebit
* Feature: Added support for payoutOrgCredit, payoutOrgDebit
* Feature: Added fundingCustomerID support
* Feature: Enhancements to fastAccessFunding

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.9.0
JAR_VERSION=12.10.0
KIT_DIR=build/kit/java15
KIT_DEPENDENCIES_DIR=build/kit/java15/dependencies
OPENSFTP_DIR=lib/opensftp-0.3.0
SCHEMA_VERSION=12.9
SCHEMA_VERSION=12.10
39 changes: 39 additions & 0 deletions src/functionalTest/java/com/cnp/sdk/TestAuth.java
Original file line number Diff line number Diff line change
Expand Up @@ -324,4 +324,43 @@ public void testListOfTaxAmounts() throws Exception {
assertEquals(response.getMessage(), "Approved", response.getMessage());
}

@Test
public void simpleAuthWithCardSkipRealtimeAUTrue() throws Exception {
Authorization authorization = new Authorization();
authorization.setReportGroup("Planets");
authorization.setOrderId("12344");
authorization.setAmount(106L);
authorization.setOrderSource(OrderSourceType.ECOMMERCE);
authorization.setId("id");
authorization.setSkipRealtimeAU(true);
CardType card = new CardType();
card.setType(MethodOfPaymentTypeEnum.VI);
card.setNumber("4100000000000000");
card.setExpDate("1210");
authorization.setCard(card);

AuthorizationResponse response = cnp.authorize(authorization);
assertEquals(response.getMessage(), "000",response.getResponse());
assertEquals("Approved", response.getMessage());
}

@Test
public void simpleAuthWithCardSkipRealtimeAUFalse() throws Exception {
Authorization authorization = new Authorization();
authorization.setReportGroup("Planets");
authorization.setOrderId("12344");
authorization.setAmount(106L);
authorization.setOrderSource(OrderSourceType.ECOMMERCE);
authorization.setId("id");
authorization.setSkipRealtimeAU(false);
CardType card = new CardType();
card.setType(MethodOfPaymentTypeEnum.VI);
card.setNumber("4100000000000000");
card.setExpDate("1210");
authorization.setCard(card);

AuthorizationResponse response = cnp.authorize(authorization);
assertEquals(response.getMessage(), "000",response.getResponse());
assertEquals("Approved", response.getMessage());
}
}
9 changes: 9 additions & 0 deletions src/functionalTest/java/com/cnp/sdk/TestBatchFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import javax.xml.bind.JAXBException;

import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;

import com.cnp.sdk.generate.AccountUpdate;
Expand Down Expand Up @@ -114,6 +115,14 @@
public class TestBatchFile {
private final long TIME_STAMP = System.currentTimeMillis();
private String preliveStatus = System.getenv("preliveStatus");
@Before
public void setup() {
if (preliveStatus == null) {
System.out.println("preliveStatus environment variable is not defined. Defaulting to down.");
preliveStatus = "down";
}
}

@Test
public void testSendToCnp_WithFileConfig() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public void setup() throws IOException {
config.setProperty("merchantId", encMerchantId);

preliveStatus = System.getenv("preliveStatus");
if (preliveStatus == null) {
System.out.println("preliveStatus environment variable is not defined. Defaulting to down.");
preliveStatus = "down";
}
}

@Test
Expand Down
11 changes: 10 additions & 1 deletion src/functionalTest/java/com/cnp/sdk/TestRFRFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,23 @@
import java.util.Properties;

import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;
import com.cnp.sdk.generate.AccountUpdateFileRequestData;
import com.cnp.sdk.generate.RFRRequest;

public class TestRFRFile {

private String preliveStatus = System.getenv("preliveStatus");


@Before
public void setup() {
if (preliveStatus == null) {
System.out.println("preliveStatus environment variable is not defined. Defaulting to down.");
preliveStatus = "down";
}
}

@Test
public void testSendToCnpSFTP() throws Exception {

Expand Down
36 changes: 36 additions & 0 deletions src/functionalTest/java/com/cnp/sdk/TestSale.java
Original file line number Diff line number Diff line change
Expand Up @@ -240,4 +240,40 @@ public void testSaleWithSofort() throws Exception{

assertEquals("Approved", response.getMessage());
}

@Test
public void simpleSaleWithCardSkipRealtimeAUTrue() throws Exception{
Sale sale = new Sale();
sale.setAmount(106L);
sale.setCnpTxnId(123456L);
sale.setOrderId("12344");
sale.setOrderSource(OrderSourceType.ECOMMERCE);
sale.setSkipRealtimeAU(true);
CardType card = new CardType();
card.setType(MethodOfPaymentTypeEnum.VI);
card.setNumber("4100000000000000");
card.setExpDate("1210");
sale.setCard(card);
sale.setId("id");
SaleResponse response = cnp.sale(sale);
assertEquals("Approved", response.getMessage());
}

@Test
public void simpleSaleWithCardSkipRealtimeAUFalse() throws Exception{
Sale sale = new Sale();
sale.setAmount(106L);
sale.setCnpTxnId(123456L);
sale.setOrderId("12344");
sale.setOrderSource(OrderSourceType.ECOMMERCE);
sale.setSkipRealtimeAU(false);
CardType card = new CardType();
card.setType(MethodOfPaymentTypeEnum.VI);
card.setNumber("4100000000000000");
card.setExpDate("1210");
sale.setCard(card);
sale.setId("id");
SaleResponse response = cnp.sale(sale);
assertEquals("Approved", response.getMessage());
}
}
4 changes: 2 additions & 2 deletions src/main/java/com/cnp/sdk/Versions.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

public class Versions {

public static final String XML_VERSION="12.9";
public static final String SDK_VERSION="Java;12.9.0";
public static final String XML_VERSION="12.10";
public static final String SDK_VERSION="Java;12.10.0";

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<xs:schema targetNamespace="http://www.vantivcnp.com/schema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xp="http://www.vantivcnp.com/schema" elementFormDefault="qualified" attributeFormDefault="unqualified">

<xs:include schemaLocation="cnpTransaction_v12.9.xsd" />
<xs:include schemaLocation="cnpTransaction_v12.10.xsd" />

<xs:element name="cnpRequest">
<xs:complexType>
Expand Down Expand Up @@ -165,6 +165,7 @@
<xs:attribute name="id" type="xp:string25Type" />
<xs:attribute name="cnpBatchId" type="xp:cnpIdType" use="required" />
<xs:attribute name="merchantId" type="xp:merchantIdentificationType" use="required" />
<xs:attribute name="numAccountUpdates" type="xs:integer" use="optional" default="0"/>
</xs:complexType>
</xs:element>

Expand Down Expand Up @@ -280,7 +281,7 @@
</xs:complexType>
</xs:element>

<xs:element name="vendorCreditCtx" substitutionGroup="xp:transaction">
<xs:element name="vendorCredit" substitutionGroup="xp:transaction">
<xs:complexType>
<xs:complexContent>
<xs:extension base="xp:transactionTypeWithReportGroup">
Expand All @@ -293,15 +294,15 @@
<xs:element name="vendorName" type="xp:string256Type"/>
<xs:element name="fundsTransferId" type="xp:string36Type" />
<xs:element name="amount" type="xp:transactionAmountType" />
<xs:element name="accountInfo" type="xp:echeckTypeCtx" />
<xs:element name="accountInfo" type="xp:echeckType" />
</xs:sequence>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>

<xs:element name="vendorDebitCtx" substitutionGroup="xp:transaction">
<xs:element name="vendorDebit" substitutionGroup="xp:transaction">
<xs:complexType>
<xs:complexContent>
<xs:extension base="xp:transactionTypeWithReportGroup">
Expand All @@ -314,7 +315,7 @@
<xs:element name="vendorName" type="xp:string256Type"/>
<xs:element name="fundsTransferId" type="xp:string36Type" />
<xs:element name="amount" type="xp:transactionAmountType" />
<xs:element name="accountInfo" type="xp:echeckTypeCtx" />
<xs:element name="accountInfo" type="xp:echeckType" />
</xs:sequence>
</xs:choice>
</xs:extension>
Expand All @@ -323,7 +324,7 @@
</xs:element>


<xs:element name="submerchantCreditCtx" substitutionGroup="xp:transaction">
<xs:element name="submerchantCredit" substitutionGroup="xp:transaction">
<xs:complexType>
<xs:complexContent>
<xs:extension base="xp:transactionTypeWithReportGroup">
Expand All @@ -333,7 +334,7 @@
<xs:element name="submerchantName" type="xp:string256Type"/>
<xs:element name="fundsTransferId" type="xp:string36Type" />
<xs:element name="amount" type="xp:transactionAmountType" />
<xs:element name="accountInfo" type="xp:echeckTypeCtx" />
<xs:element name="accountInfo" type="xp:echeckType" />
<xs:element name="customIdentifier" type="xp:string15Type" minOccurs="0" />
</xs:sequence>
</xs:choice>
Expand All @@ -342,7 +343,7 @@
</xs:complexType>
</xs:element>

<xs:element name="submerchantDebitCtx" substitutionGroup="xp:transaction">
<xs:element name="submerchantDebit" substitutionGroup="xp:transaction">
<xs:complexType>
<xs:complexContent>
<xs:extension base="xp:transactionTypeWithReportGroup">
Expand All @@ -352,7 +353,7 @@
<xs:element name="submerchantName" type="xp:string256Type"/>
<xs:element name="fundsTransferId" type="xp:string36Type" />
<xs:element name="amount" type="xp:transactionAmountType" />
<xs:element name="accountInfo" type="xp:echeckTypeCtx" />
<xs:element name="accountInfo" type="xp:echeckType" />
<xs:element name="customIdentifier" type="xp:string15Type" minOccurs="0" />
</xs:sequence>
</xs:choice>
Expand All @@ -361,7 +362,7 @@
</xs:complexType>
</xs:element>

<xs:element name="customerCreditCtx" substitutionGroup="xp:transaction">
<xs:element name="customerCredit" substitutionGroup="xp:transaction">
<xs:complexType>
<xs:complexContent>
<xs:extension base="xp:transactionTypeWithReportGroup">
Expand All @@ -371,7 +372,7 @@
<xs:element name="customerName" type="xp:string256Type"/>
<xs:element name="fundsTransferId" type="xp:string36Type" />
<xs:element name="amount" type="xp:transactionAmountType" />
<xs:element name="accountInfo" type="xp:echeckTypeCtx" />
<xs:element name="accountInfo" type="xp:echeckType" />
<xs:element name="customIdentifier" type="xp:string15Type" minOccurs="0" />
</xs:sequence>
</xs:choice>
Expand All @@ -380,7 +381,7 @@
</xs:complexType>
</xs:element>

<xs:element name="customerDebitCtx" substitutionGroup="xp:transaction">
<xs:element name="customerDebit" substitutionGroup="xp:transaction">
<xs:complexType>
<xs:complexContent>
<xs:extension base="xp:transactionTypeWithReportGroup">
Expand All @@ -390,13 +391,16 @@
<xs:element name="customerName" type="xp:string256Type"/>
<xs:element name="fundsTransferId" type="xp:string36Type" />
<xs:element name="amount" type="xp:transactionAmountType" />
<xs:element name="accountInfo" type="xp:echeckTypeCtx" />
<xs:element name="accountInfo" type="xp:echeckType" />
<xs:element name="customIdentifier" type="xp:string15Type" minOccurs="0" />
</xs:sequence>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>



</xs:schema>

Original file line number Diff line number Diff line change
Expand Up @@ -909,4 +909,5 @@
<xs:enumeration value="N" />
</xs:restriction>
</xs:simpleType>

</xs:schema>
Loading

0 comments on commit 90a940d

Please sign in to comment.