Skip to content

Commit

Permalink
Merge branch 'sdk-94' into 'master'
Browse files Browse the repository at this point in the history
SDK-94: Change Default RIS version

See merge request kount/third_party/kount-ris-java-sdk!22
  • Loading branch information
mmewara committed Mar 10, 2021
2 parents 65bb9c0 + bee9c83 commit 939a37a
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Kount Java SDK
### What is this repository for? ###

* Contains sources, tests, and resources for the Kount Java SDK
* SDK version: `7.3.5`
* SDK version: `7.3.7`

### How do I get set up? ###

Expand All @@ -25,7 +25,7 @@ Kount Java SDK
`<dependency>
<groupId>com.kount</groupId>
<artifactId>kount-ris-sdk</artifactId>
<version>7.3.5</version>
<version>7.3.7</version>
</dependency>`

### Contribution guidelines ###
Expand Down
8 changes: 8 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
Version 7.3.7 changes
---------------------
10/03/2021

1. Updated the default version of the RIS call to use version 0710
2. Added new getters respective to new RIS version
3. Removed data validations from SDK side

Version 7.1.0 changes
---------------------
07/02/2017
Expand Down
4 changes: 2 additions & 2 deletions kount-ris-sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<parent>
<groupId>com.kount</groupId>
<artifactId>kount-java-parent</artifactId>
<version>7.3.6</version>
<version>7.3.7</version>
</parent>

<groupId>com.kount</groupId>
<artifactId>kount-ris-sdk</artifactId>
<version>7.3.6</version>
<version>7.3.7</version>
<packaging>jar</packaging>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion kount-ris-sdk/src/main/java/com/kount/ris/Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public abstract class Request {
* @throws RisException
*/
public Request() {
setVersion("0700");
setVersion("0710");
setKhashPaymentEncoding(true);
params.put("SDK", "JAVA");
}
Expand Down
19 changes: 19 additions & 0 deletions kount-ris-sdk/src/main/java/com/kount/ris/Response.java
Original file line number Diff line number Diff line change
Expand Up @@ -915,4 +915,23 @@ public int getNumberCountersTriggered() {
return 0;
}

/**
* Get the Previously WhiteListed.
*
* @return PREVIOUSLY_WHITELISTED
*/
public String getPreviouslyWhiteListed() {
return this.params.get("PREVIOUSLY_WHITELISTED");
}


/**
* Get the 3D Secure Merchant Response.
*
* @return 3D_SECURE_MERCHANT_RESPONSE
*/
public String get3DSecureMerchantResponse() {
return this.params.get("3D_SECURE_MERCHANT_RESPONSE");
}

}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.kount</groupId>
<artifactId>kount-java-parent</artifactId>
<version>7.3.6</version>
<version>7.3.7</version>
<packaging>pom</packaging>

<name>Kount Java SDK</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ public static Inquiry defaultInquiry(String sessionId, int merchantId) {
.setShippingPhoneNumber("555-777-1212")
.setIpAddress("131.206.45.21")
.setCart(Collections.singletonList(cartItem0))

.setVersion("0700")
.setMerchantId(merchantId)
.setPayment(payment)
.setSessionId(sessionId)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.kount.ris;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

import java.io.InputStream;
import java.net.URL;
Expand Down Expand Up @@ -84,7 +85,36 @@ public void testTotalAndCashWithLongType() throws RisException {

assertEquals(0, response.getErrorCount());
}


@Test
public void testPreviouslyWhiteListedExistWithRisCallVersion_0710() throws RisException {
logger.debug("running get previously white listed test"); ;
Inquiry inq = getInquiry();
inq.setVersion("0710");
Response response = client.process(inq);
logger.trace(response.toString());
assertTrue( response.getPreviouslyWhiteListed()!= null);
}

@Test
public void test3dSecureMerchantResponseExistWithRisCallVersion_0710() throws RisException {
logger.debug("running get 3D secure merchant response test"); ;
Inquiry inq = getInquiry();
inq.setVersion("0710");
Response response = client.process(inq);
logger.trace(response.toString());
assertTrue( response.get3DSecureMerchantResponse() != null);
}

@Test
public void testDefaultRisCallVersion() throws RisException {
logger.debug("running default ris call version test"); ;
Inquiry inq = getInquiry();
Response response = client.process(inq);
logger.trace(response.toString());
assertEquals("0710", response.getVersion());
}

private static Inquiry getInquiry() {
Inquiry inq = Utilities.defaultInquiry(Utilities.generateUniqueId(), 0);
inq.setMerchantId(MERCHANT_ID);
Expand Down

0 comments on commit 939a37a

Please sign in to comment.