Skip to content

Commit 0179b8c

Browse files
authored
Merge pull request #342 from Adyen/develop
Release 6.1.0
2 parents 47bdced + 5a6cc33 commit 0179b8c

File tree

6 files changed

+125
-47
lines changed

6 files changed

+125
-47
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @rkewlani @AlexandrosMor @martinsrenato @rikterbeek @andrei-dediu
1+
* @rkewlani @AlexandrosMor @martinsrenato @rikterbeek @andrei-dediu @Aleffio

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Add this dependency to your project's POM:
3838
<dependency>
3939
<groupId>com.adyen</groupId>
4040
<artifactId>adyen-java-api-library</artifactId>
41-
<version>6.0.0</version>
41+
<version>6.1.0</version>
4242
</dependency>
4343
```
4444

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.adyen</groupId>
55
<artifactId>adyen-java-api-library</artifactId>
66
<packaging>jar</packaging>
7-
<version>6.0.0</version>
7+
<version>6.1.0</version>
88
<name>Adyen Java API Library</name>
99
<description>Adyen API Client Library for Java</description>
1010
<url>https://github.com/adyen/adyen-java-api-library</url>

src/main/java/com/adyen/Client.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ public class Client {
3535
public static final String HPP_LIVE = "https://live.adyen.com/hpp";
3636
public static final String MARKETPAY_ENDPOINT_TEST = "https://cal-test.adyen.com/cal/services";
3737
public static final String MARKETPAY_ENDPOINT_LIVE = "https://cal-live.adyen.com/cal/services";
38-
public static final String API_VERSION = "v51";
38+
public static final String API_VERSION = "v52";
3939
public static final String PAYOUT_API_VERSION = "v51";
4040
public static final String RECURRING_API_VERSION = "v25";
4141
public static final String MARKETPAY_ACCOUNT_API_VERSION = "v5";
4242
public static final String MARKETPAY_FUND_API_VERSION = "v5";
4343
public static final String MARKETPAY_NOTIFICATION_API_VERSION = "v1";
4444
public static final String LIB_NAME = "adyen-java-api-library";
45-
public static final String LIB_VERSION = "6.0.0";
45+
public static final String LIB_VERSION = "6.1.0";
4646
public static final String CHECKOUT_ENDPOINT_TEST = "https://checkout-test.adyen.com/checkout";
4747
public static final String CHECKOUT_ENDPOINT_LIVE_SUFFIX = "-checkout-live.adyenpayments.com/checkout";
48-
public static final String CHECKOUT_API_VERSION = "v51";
48+
public static final String CHECKOUT_API_VERSION = "v52";
4949
public static final String BIN_LOOKUP_PAL_SUFFIX = "/pal/servlet/BinLookup/";
5050
public static final String BIN_LOOKUP_API_VERSION = "v50";
5151
public static final String CHECKOUT_UTILITY_API_VERSION = "v1";

src/main/java/com/adyen/model/AbstractPaymentRequest.java

Lines changed: 92 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import com.google.gson.annotations.JsonAdapter;
3535
import com.google.gson.annotations.SerializedName;
3636

37+
3738
/**
3839
* AbstractPaymentRequest Base for PaymentRequest and PaymentRequest3D
3940
*/
@@ -96,6 +97,33 @@ public String toString() {
9697
@SerializedName("fraudOffset")
9798
private Integer fraudOffset = null;
9899

100+
/**
101+
* How to process a combo card (for some Brazilian cards only). Allowed values: * debit * credit
102+
*/
103+
public enum FundingSourceEnum {
104+
105+
@SerializedName("debit") DEBIT("debit"),
106+
@SerializedName("credit") CREDIT("credit");
107+
108+
private String value;
109+
110+
FundingSourceEnum(String value) {
111+
this.value = value;
112+
}
113+
114+
public String getValue() {
115+
return value;
116+
}
117+
118+
@Override
119+
public String toString() {
120+
return String.valueOf(value);
121+
}
122+
}
123+
124+
@SerializedName("fundingSource")
125+
private FundingSourceEnum fundingSource = null;
126+
99127
@SerializedName("sessionId")
100128
private String sessionId = null;
101129

@@ -173,7 +201,8 @@ public AbstractPaymentRequest() {
173201

174202
/**
175203
* Set browser data
176-
* @param userAgent http header
204+
*
205+
* @param userAgent http header
177206
* @param acceptHeader http header
178207
* @return browser data
179208
*/
@@ -415,6 +444,25 @@ public T sessionId(String sessionId) {
415444
return (T) this;
416445
}
417446

447+
public T fundingSource(FundingSourceEnum fundingSource) {
448+
this.fundingSource = fundingSource;
449+
return (T) this;
450+
}
451+
452+
/**
453+
* How to process a combo card (for some Brazilian cards only). Allowed values: * debit * credit
454+
*
455+
* @return fundingSource
456+
**/
457+
public FundingSourceEnum getFundingSource() {
458+
return fundingSource;
459+
}
460+
461+
public void setFundingSource(FundingSourceEnum fundingSource) {
462+
this.fundingSource = fundingSource;
463+
}
464+
465+
418466
/**
419467
* Get sessionId
420468
*
@@ -781,6 +829,7 @@ public T enableRealTimeUpdate(Boolean enableRealTimeUpdate) {
781829

782830
/**
783831
* Choose if a specific transaction should use the Real-time Account Updater, regardless of other settings.
832+
*
784833
* @return enableRealTimeUpdate
785834
**/
786835
public Boolean isEnableRealTimeUpdate() {
@@ -798,6 +847,7 @@ public T threeDSAuthenticationOnly(Boolean threeDSAuthenticationOnly) {
798847

799848
/**
800849
* If set to true, you will only perform the [3D Secure 2 authentication](https://docs.adyen.com/checkout/3d-secure/native-3ds2/authentication-only), and not the payment authorisation.
850+
*
801851
* @return threeDSAuthenticationOnly
802852
**/
803853
public Boolean isThreeDSAuthenticationOnly() {
@@ -829,6 +879,7 @@ public boolean equals(Object o) {
829879
&& Objects.equals(this.recurring, paymentRequest.recurring)
830880
&& Objects.equals(this.shopperStatement, paymentRequest.shopperStatement)
831881
&& Objects.equals(this.fraudOffset, paymentRequest.fraudOffset)
882+
&& Objects.equals(this.fundingSource, paymentRequest.fundingSource)
832883
&& Objects.equals(this.sessionId, paymentRequest.sessionId)
833884
&& Objects.equals(this.additionalAmount, paymentRequest.additionalAmount)
834885
&& Objects.equals(this.selectedRecurringDetailReference, paymentRequest.selectedRecurringDetailReference)
@@ -857,40 +908,41 @@ public boolean equals(Object o) {
857908
@Override
858909
public int hashCode() {
859910
return Objects.hash(amount,
860-
reference,
861-
billingAddress,
862-
shopperIP,
863-
merchantAccount,
864-
browserInfo,
865-
shopperInteraction,
866-
shopperEmail,
867-
shopperReference,
868-
recurring,
869-
shopperStatement,
870-
fraudOffset,
871-
sessionId,
872-
additionalAmount,
873-
selectedRecurringDetailReference,
874-
orderReference,
875-
merchantOrderReference,
876-
dccQuote,
877-
additionalData,
878-
shopperName,
879-
shopperLocale,
880-
selectedBrand,
881-
deliveryAddress,
882-
deliveryDate,
883-
deviceFingerprint,
884-
installments,
885-
socialSecurityNumber,
886-
captureDelayHours,
887-
dateOfBirth,
888-
telephoneNumber,
889-
mcc,
890-
metadata,
891-
applicationInfo,
892-
enableRealTimeUpdate,
893-
threeDSAuthenticationOnly);
911+
reference,
912+
billingAddress,
913+
shopperIP,
914+
merchantAccount,
915+
browserInfo,
916+
shopperInteraction,
917+
shopperEmail,
918+
shopperReference,
919+
recurring,
920+
shopperStatement,
921+
fraudOffset,
922+
fundingSource,
923+
sessionId,
924+
additionalAmount,
925+
selectedRecurringDetailReference,
926+
orderReference,
927+
merchantOrderReference,
928+
dccQuote,
929+
additionalData,
930+
shopperName,
931+
shopperLocale,
932+
selectedBrand,
933+
deliveryAddress,
934+
deliveryDate,
935+
deviceFingerprint,
936+
installments,
937+
socialSecurityNumber,
938+
captureDelayHours,
939+
dateOfBirth,
940+
telephoneNumber,
941+
mcc,
942+
metadata,
943+
applicationInfo,
944+
enableRealTimeUpdate,
945+
threeDSAuthenticationOnly);
894946
}
895947

896948
@Override
@@ -909,6 +961,7 @@ public String toString() {
909961
sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n");
910962
sb.append(" shopperStatement: ").append(toIndentedString(shopperStatement)).append("\n");
911963
sb.append(" fraudOffset: ").append(toIndentedString(fraudOffset)).append("\n");
964+
sb.append(" fundingSource: ").append(toIndentedString(fundingSource)).append("\n");
912965
sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n");
913966
sb.append(" additionalAmount: ").append(toIndentedString(additionalAmount)).append("\n");
914967
sb.append(" selectedRecurringDetailReference: ").append(toIndentedString(selectedRecurringDetailReference)).append("\n");
@@ -943,10 +996,10 @@ private String stringifyAdditionalData() {
943996

944997
Map<String, String> nonSensitiveAdditionalData = new HashMap<String, String>(additionalData);
945998
List<String> keys = Arrays.asList(ApiConstants.AdditionalData.Card.Encrypted.JSON,
946-
ApiConstants.AdditionalData.ENCRYPTED_CARD_NUMBER,
947-
ApiConstants.AdditionalData.ENCRYPTED_EXPIRY_MONTH,
948-
ApiConstants.AdditionalData.ENCRYPTED_EXPIRY_YEAR,
949-
ApiConstants.AdditionalData.ENCRYPTED_SECURITY_CODE);
999+
ApiConstants.AdditionalData.ENCRYPTED_CARD_NUMBER,
1000+
ApiConstants.AdditionalData.ENCRYPTED_EXPIRY_MONTH,
1001+
ApiConstants.AdditionalData.ENCRYPTED_EXPIRY_YEAR,
1002+
ApiConstants.AdditionalData.ENCRYPTED_SECURITY_CODE);
9501003

9511004
for (String key : keys) {
9521005
if (nonSensitiveAdditionalData.containsKey(key)) {

src/main/java/com/adyen/model/checkout/PaymentsResponse.java

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
package com.adyen.model.checkout;
2323

2424
import com.adyen.Util.DateUtil;
25+
import com.adyen.model.Amount;
2526
import com.adyen.model.FraudResult;
2627
import com.adyen.model.ThreeDS2Result;
2728
import com.google.gson.TypeAdapter;
@@ -106,6 +107,9 @@ public class PaymentsResponse {
106107
@SerializedName("action")
107108
private CheckoutPaymentsAction action;
108109

110+
@SerializedName("amount")
111+
private Amount amount = null;
112+
109113
public PaymentsResponse additionalData(Map<String, String> additionalData) {
110114
this.additionalData = additionalData;
111115
return this;
@@ -372,6 +376,24 @@ public PaymentsResponse action(CheckoutPaymentsAction action) {
372376
return this;
373377
}
374378

379+
public PaymentsResponse amount(Amount amount) {
380+
this.amount = amount;
381+
return this;
382+
}
383+
384+
/**
385+
* Get amount
386+
*
387+
* @return amount
388+
**/
389+
public Amount getAmount() {
390+
return amount;
391+
}
392+
393+
public void setAmount(Amount amount) {
394+
this.amount = amount;
395+
}
396+
375397
@Override
376398
public boolean equals(Object o) {
377399
if (this == o) {
@@ -397,13 +419,15 @@ public boolean equals(Object o) {
397419
&& Objects.equals(this.outputDetails, paymentsResponse.outputDetails)
398420
&& Objects.equals(this.authentication, paymentsResponse.authentication)
399421
&& Objects.equals(this.threeDS2Result, paymentsResponse.threeDS2Result)
400-
&& Objects.equals(this.action, paymentsResponse.action);
422+
&& Objects.equals(this.action, paymentsResponse.action)
423+
&& Objects.equals(this.amount, paymentsResponse.amount);
424+
401425

402426
}
403427

404428
@Override
405429
public int hashCode() {
406-
return Objects.hash(additionalData, details, fraudResult, paymentData, pspReference, redirect, refusalReason, resultCode, serviceError, authResponse, merchantReference, outputDetails, authentication, threeDS2Result, action);
430+
return Objects.hash(additionalData, details, fraudResult, paymentData, pspReference, redirect, refusalReason, resultCode, serviceError, authResponse, merchantReference, outputDetails, authentication, threeDS2Result, action, amount);
407431
}
408432

409433
@Override
@@ -426,6 +450,7 @@ public String toString() {
426450
sb.append(" authentication: ").append(toIndentedString(authentication)).append("\n");
427451
sb.append(" threeDS2Result: ").append(toIndentedString(threeDS2Result)).append("\n");
428452
sb.append(" action: ").append(toIndentedString(action)).append("\n");
453+
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
429454
sb.append("}");
430455
return sb.toString();
431456
}

0 commit comments

Comments
 (0)