Skip to content

Commit

Permalink
Ideal Payment Update (CS2). Card Wallet Type Support. Sessions Authen…
Browse files Browse the repository at this point in the history
…tication Type Update (#406)

* Update auth type sessions

* Add card_wallet_types

* Update Ideal payment request
  • Loading branch information
armando-rodriguez-cko authored May 8, 2024
1 parent 6a82f00 commit f33a596
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 6 deletions.
12 changes: 12 additions & 0 deletions src/main/java/com/checkout/common/CardWalletType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.checkout.common;

import com.google.gson.annotations.SerializedName;

public enum CardWalletType {

@SerializedName("applepay")
APPLEPAY,
@SerializedName("googlepay")
GOOGLEPAY,

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,14 @@
@ToString(callSuper = true)
public final class RequestIdealSource extends AbstractRequestSource {

private String bic;

private String description;

private String language;

@Builder
private RequestIdealSource(final String bic,
final String description,
private RequestIdealSource(final String description,
final String language) {
super(PaymentSourceType.IDEAL);
this.bic = bic;
this.description = description;
this.language = language;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.checkout.common.Address;
import com.checkout.common.CardCategory;
import com.checkout.common.CardType;
import com.checkout.common.CardWalletType;
import com.checkout.common.CountryCode;
import com.checkout.common.Phone;
import com.google.gson.annotations.SerializedName;
Expand Down Expand Up @@ -55,6 +56,9 @@ public final class CardResponseSource extends AbstractResponseSource implements
@SerializedName("card_category")
private CardCategory cardCategory;

@SerializedName("card_wallet_type")
private CardWalletType cardWalletType;

private String issuer;

@SerializedName("issuer_country")
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/checkout/sessions/AuthenticationType.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,13 @@ public enum AuthenticationType {
@SerializedName("recurring")
RECURRING,

@SerializedName("installment")
INSTALLMENT,

@SerializedName("maintain_card")
MAINTAIN_CARD,

@SerializedName("add_card")
ADD_CARD,

}
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ void shouldMakeAliPayPayment() {
}

@Test
@Disabled("unavailable")
void shouldMakeIdealPayment() {
final PaymentRequest paymentRequest = PaymentRequest.builder()
.source(RequestIdealSource.builder()
.bic("INGBNL2A")
.description("ORD50234E89")
.language("nl")
.build())
Expand Down

0 comments on commit f33a596

Please sign in to comment.