Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ideal Payment Update (CS2). Card Wallet Type Support. Sessions Authentication Type Update #406

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading