Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Commit

Permalink
Release 6.22.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
IngenicoEPayments authored and jenkins committed Jun 24, 2021
1 parent 4eeee04 commit 3d58047
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.ingenico.connect.gateway</groupId>
<artifactId>connect-sdk-java</artifactId>
<version>6.21.0</version>
<version>6.22.0</version>
<packaging>jar</packaging>

<name>connect-sdk-java</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*/
package com.ingenico.connect.gateway.sdk.java.domain.payment.definitions;

import java.util.List;

/**
* Object containing rendering options of the device
*/
Expand All @@ -13,6 +15,8 @@ public class DeviceRenderOptions {

private String sdkUiType = null;

private List<String> sdkUiTypes = null;

/**
* Lists all of the SDK Interface types that the device supports for displaying specific challenge user interfaces within the SDK.<p></p><ul class="paragraph-width"><li>native = The app supports only a native user interface</li><li>html = The app supports only an HTML user interface</li><li>both = Both Native and HTML user interfaces are supported by the app</li></ul>
*/
Expand All @@ -29,15 +33,35 @@ public void setSdkInterface(String value) {

/**
* Lists all UI types that the device supports for displaying specific challenge user interfaces within the SDK.<p></p><ul class="paragraph-width"><li>text = Text interface</li><li>single-select = Select a single option</li><li>multi-select = Select multiple options</li><li>oob = Out of ounds</li><li>html-other = HTML Other (only valid when cardPaymentMethodSpecificInput.threeDSecure.sdkData.deviceRenderOptions.sdkInterface is set to html)</li></ul>
*
* @deprecated Use deviceRenderOptions.sdkUiTypes instead
*/
@Deprecated
public String getSdkUiType() {
return sdkUiType;
}

/**
* Lists all UI types that the device supports for displaying specific challenge user interfaces within the SDK.<p></p><ul class="paragraph-width"><li>text = Text interface</li><li>single-select = Select a single option</li><li>multi-select = Select multiple options</li><li>oob = Out of ounds</li><li>html-other = HTML Other (only valid when cardPaymentMethodSpecificInput.threeDSecure.sdkData.deviceRenderOptions.sdkInterface is set to html)</li></ul>
*
* @deprecated Use deviceRenderOptions.sdkUiTypes instead
*/
@Deprecated
public void setSdkUiType(String value) {
this.sdkUiType = value;
}

/**
* Lists all UI types that the device supports for displaying specific challenge user interfaces within the SDK.<p></p><ul class="paragraph-width"><li>text = Text interface</li><li>single-select = Select a single option</li><li>multi-select = Select multiple options</li><li>oob = Out of ounds</li><li>html-other = HTML Other (only valid when cardPaymentMethodSpecificInput.threeDSecure.sdkData.deviceRenderOptions.sdkInterface is set to html)</li></ul>
*/
public List<String> getSdkUiTypes() {
return sdkUiTypes;
}

/**
* Lists all UI types that the device supports for displaying specific challenge user interfaces within the SDK.<p></p><ul class="paragraph-width"><li>text = Text interface</li><li>single-select = Select a single option</li><li>multi-select = Select multiple options</li><li>oob = Out of ounds</li><li>html-other = HTML Other (only valid when cardPaymentMethodSpecificInput.threeDSecure.sdkData.deviceRenderOptions.sdkInterface is set to html)</li></ul>
*/
public void setSdkUiTypes(List<String> value) {
this.sdkUiTypes = value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ public void setIsRecurring(Boolean value) {
}

/**
* Object containing specific input required for UPI payments.
* Object containing specific input required for UPI (Payment product ID 4101)
*/
public RedirectPaymentProduct4101SpecificInput getPaymentProduct4101SpecificInput() {
return paymentProduct4101SpecificInput;
}

/**
* Object containing specific input required for UPI payments.
* Object containing specific input required for UPI (Payment product ID 4101)
*/
public void setPaymentProduct4101SpecificInput(RedirectPaymentProduct4101SpecificInput value) {
this.paymentProduct4101SpecificInput = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,69 @@
package com.ingenico.connect.gateway.sdk.java.domain.payment.definitions;

/**
* Contains specific input required for UPI payments.
* Please find below specific input fields for payment product 4101 (UPI)
*/
public class RedirectPaymentProduct4101SpecificInput {

private String integrationType = null;

private String merchantName = null;

private String transactionNote = null;

private String vpa = null;

/**
* The integration type to be used in the UPI payment
* The value of this property must be either or 'vpa', 'QRCode', or 'urlIntent'.
*/
public String getIntegrationType() {
return integrationType;
}

/**
* The integration type to be used in the UPI payment
* The value of this property must be either or 'vpa', 'QRCode', or 'urlIntent'.
*/
public void setIntegrationType(String value) {
this.integrationType = value;
}

/**
* The virtual payment address.
* The merchant name as shown to the customer in some payment applications.
*/
public String getMerchantName() {
return merchantName;
}

/**
* The merchant name as shown to the customer in some payment applications.
*/
public void setMerchantName(String value) {
this.merchantName = value;
}

/**
* Some additional transaction information as shown to the customer in some payment applications.
*/
public String getTransactionNote() {
return transactionNote;
}

/**
* Some additional transaction information as shown to the customer in some payment applications.
*/
public void setTransactionNote(String value) {
this.transactionNote = value;
}

/**
* The Virtual Payment Address (VPA) of the customer.
*/
public String getVpa() {
return vpa;
}

/**
* The virtual payment address.
* The Virtual Payment Address (VPA) of the customer.
*/
public void setVpa(String value) {
this.vpa = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
public class MetaDataProvider {

private static final String SDK_VERSION = "6.21.0";
private static final String SDK_VERSION = "6.22.0";

private static final String SERVER_META_INFO_HEADER = "X-GCS-ServerMetaInfo";
static final Set<String> PROHIBITED_HEADERS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,58 @@ public void testCreateAuthenticationSignature2() {

Assert.assertEquals("9ond5EIN05dBXJGCLRK5om9pxHsyrh/12pZJ7bvmwNM=", authenticationSignature);
}

@Test
public void testCreateAuthenticationSignatureFromApiReference1() {

DefaultAuthenticator authenticator = new DefaultAuthenticator(AuthorizationType.V1HMAC, "5e45c937b9db33ae", "I42Zf4pVnRdroHfuHnRiJjJ2B6+22h0yQt/R3nZR8Xg=");

String dataToSign = "GET\n"
+ "\n"
+ "Fri, 06 Jun 2014 13:39:43 GMT\n"
+ "/v1/9991/tokens/123456789\n";

String authenticationSignature = authenticator.createAuthenticationSignature(dataToSign);

Assert.assertEquals("J5LjfSBvrQNhu7gG0gvifZt+IWNDReGCmHmBmth6ueI=", authenticationSignature);
}

@Test
public void testCreateAuthenticationSignatureFromApiReference2() {

DefaultAuthenticator authenticator = new DefaultAuthenticator(AuthorizationType.V1HMAC, "5e45c937b9db33ae", "I42Zf4pVnRdroHfuHnRiJjJ2B6+22h0yQt/R3nZR8Xg=");

String dataToSign = "GET\n"
+ "\n"
+ "Fri, 06 Jun 2014 13:39:43 GMT\n"
+ "/v1/consumer/ANDR%C3%89E/?q=na%20me\n";

String authenticationSignature = authenticator.createAuthenticationSignature(dataToSign);

Assert.assertEquals("3XV7LMYus9q7fp87/D4Qih2bKNtz20iqsttdrgJ09AU=", authenticationSignature);

dataToSign = dataToSign.replace("%20", " ");

authenticationSignature = authenticator.createAuthenticationSignature(dataToSign);

Assert.assertEquals("x9S2hQmLhLTbpK0YdTuYCD8TB4D+Kf60tNW0Xw5Xls0=", authenticationSignature);
}

@Test
public void testCreateAuthenticationSignatureFromApiReference3() {

DefaultAuthenticator authenticator = new DefaultAuthenticator(AuthorizationType.V1HMAC, "5e45c937b9db33ae", "I42Zf4pVnRdroHfuHnRiJjJ2B6+22h0yQt/R3nZR8Xg=");

String dataToSign = "DELETE\n"
+ "application/json\n"
+ "Fri, 06 Jun 2014 13:39:43 GMT\n"
+ "x-gcs-clientmetainfo:processed header value\n"
+ "x-gcs-customerheader:processed header value\n"
+ "x-gcs-servermetainfo:processed header value\n"
+ "/v1/9991/tokens/123456789\n";

String authenticationSignature = authenticator.createAuthenticationSignature(dataToSign);

Assert.assertEquals("jGWLz3ouN4klE+SkqO5gO+KkbQNM06Rric7E3dcfmqw=", authenticationSignature);
}
}

0 comments on commit 3d58047

Please sign in to comment.