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

feat: Add New Fields and Update Tests for Payments Processing #465

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public final class RequestNetworkTokenSource extends AbstractRequestSource {

private Boolean stored;

@SerializedName("store_for_future_use")
private Boolean storeForFutureUse;

private String name;

private String cvv;
Expand All @@ -56,6 +59,7 @@ private RequestNetworkTokenSource(final String token,
final String cryptogram,
final String eci,
final Boolean stored,
final Boolean storeForFutureUse,
final String name,
final String cvv,
final Address billingAddress,
Expand All @@ -69,6 +73,7 @@ private RequestNetworkTokenSource(final String token,
this.cryptogram = cryptogram;
this.eci = eci;
this.stored = stored;
this.storeForFutureUse = storeForFutureUse;
this.name = name;
this.cvv = cvv;
this.billingAddress = billingAddress;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.checkout.payments.response;

import com.checkout.common.CountryCode;
import com.checkout.payments.PanProcessedType;
import com.checkout.payments.PreferredSchema;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
Expand Down Expand Up @@ -71,4 +72,10 @@ public final class ProcessingData {
@SerializedName("scheme_merchant_id")
private String schemeMerchantId;

@SerializedName("pan_type_processed")
private PanProcessedType panTypeProcessed;

@SerializedName("cko_network_token_available")
private Boolean ckoNetworkTokenAvailable;

}
1 change: 1 addition & 0 deletions src/test/java/com/checkout/TestHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public static HostedPaymentRequest createHostedPaymentRequest(final String refer
.amount(1000L)
.reference(reference)
.currency(Currency.GBP)
.displayName("Payment Test Company")
.description("Payment for Gold Necklace")
.customer(createCustomer())
.shipping(ShippingDetails.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.checkout.instruments.get.BankAccountFieldQuery;
import com.checkout.instruments.get.BankAccountFieldResponse;
import com.checkout.instruments.get.PaymentNetwork;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertFalse;
Expand All @@ -21,6 +22,7 @@ class BankAccountFieldFormattingTestIT extends SandboxTestFixture {
}

@Test
@Disabled("unavailable")
void shouldGetBankAccountFieldFormatting() {
final BankAccountFieldQuery query = BankAccountFieldQuery.builder()
.accountHolderType(AccountHolderType.INDIVIDUAL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,9 @@ void shouldMakeKnetPayment() {
.failureUrl("https://testing.checkout.com/failure")
.build();

checkErrorItem(() -> paymentsClient.requestPayment(paymentRequest), PAYEE_NOT_ONBOARDED);
final PaymentResponse paymentResponse = blocking(() -> paymentsClient.requestPayment(paymentRequest));
assertNotNull(paymentResponse);

}

@Test
Expand Down
Loading