Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

test(cypress): add BancontactCard mandate CIT coverage for stripe bankredirect (#12283)

HS-QUALIBOT673f428dcde7
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Commons.js b/cypress-tests/cypress/e2e/configs/Payment/Commons.js
index c6a1586ddc..5902345cd6 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Commons.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Commons.js
@@ -321,6 +321,17 @@ export const payment_methods_enabled = [
recurring_enabled: true,
installment_payment_enabled: true,
},
+ {
+ payment_method_type: "bancontact_card",
+ payment_experience: null,
+ card_networks: null,
+ accepted_currencies: null,
+ accepted_countries: null,
+ minimum_amount: 1,
+ maximum_amount: 68607706,
+ recurring_enabled: true,
+ installment_payment_enabled: true,
+ },
],
},
{
@@ -984,6 +995,23 @@ export const connectorDetails = {
billing: standardBillingAddress,
},
}),
+ BancontactCard: {
+ MandateSingleUse: getCustomExchange({
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ payment_method: "bank_redirect",
+ payment_method_type: "bancontact_card",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_customer_action",
+ },
+ },
+ }),
+ },
},
bank_debit_pm: {
PaymentIntent: (paymentMethodType) => {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Modifiers.js b/cypress-tests/cypress/e2e/configs/Payment/Modifiers.js
index 2aa0237072..db78ff7111 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Modifiers.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Modifiers.js
@@ -129,6 +129,7 @@ const CURRENCY_MAP = {
Przelewy24: "EUR",
Sofort: "EUR",
Trustly: "EUR",
+ BancontactCard: "EUR",
OpenBankingUk: "GBP", // Great British Pound payment method
OnlineBankingFpx: "MYR", // Malaysian payment methods
Interac: "CAD", // Canadian payment method
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Stripe.js b/cypress-tests/cypress/e2e/configs/Payment/Stripe.js
index d0db129fb0..0486d788c4 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Stripe.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Stripe.js
@@ -1123,6 +1123,56 @@ export const connectorDetails = {
},
},
},
+ BancontactCard: {
+ MandateSingleUse: {
+ Request: {
+ payment_method: "bank_redirect",
+ payment_method_type: "bancontact_card",
+ payment_method_data: {
+ bank_redirect: {
+ bancontact_card: {},
+ },
+ },
+ billing: {
+ email: "[email protected]",
+ address: {
+ line1: "1467",
+ line2: "Harrison Street",
+ line3: "Harrison Street",
+ city: "San Fransico",
+ state: "California",
+ zip: "94122",
+ country: "BE",
+ first_name: "joseph",
+ last_name: "Doe",
+ },
+ phone: {
+ number: "9123456789",
+ country_code: "+91",
+ },
+ },
+ currency: "EUR",
+ customer_acceptance: customerAcceptance,
+ mandate_data: {
+ customer_acceptance: customerAcceptance,
+ mandate_type: {
+ single_use: {
+ amount: 8000,
+ currency: "EUR",
+ },
+ },
+ },
+ setup_future_usage: "off_session",
+ payment_type: "new_mandate",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_customer_action",
+ },
+ },
+ },
+ },
},
pay_later_pm: {
AutoCapture: getCustomExchange({
diff --git a/cypress-tests/cypress/e2e/spec/Payment/18-BankRedirect.cy.js b/cypress-tests/cypress/e2e/spec/Payment/18-BankRedirect.cy.js
index 5b1ae20fe0..4b19860749 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/18-BankRedirect.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/18-BankRedirect.cy.js
@@ -660,4 +660,57 @@ describe("Bank Redirect tests", () => {
});
});
});
+
+ context(
+ "BancontactCard - MandateSingleUse Create + Confirm flow test",
+ () => {
+ let shouldContinue = true;
+
+ beforeEach(function () {
+ if (!shouldContinue) {
+ this.skip();
+ }
+ });
+
+ it("Create Payment Intent", () => {
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "bank_redirect_pm"
+ ]["PaymentIntent"]("BancontactCard");
+
+ cy.createPaymentIntentTest(
+ fixtures.createPaymentBody,
+ data,
+ "three_ds",
+ "automatic",
+ globalState
+ );
+
+ if (shouldContinue)
+ shouldContinue = utils.should_continue_further(data);
+ });
+
+ it("List Merchant Payment Methods", () => {
+ cy.paymentMethodsCallTest(globalState);
+ });
+
+ it("Confirm BancontactCard mandate CIT", () => {
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "bank_redirect_pm"
+ ]["BancontactCard"]["MandateSingleUse"];
+
+ cy.citForMandatesCallTest(
+ fixtures.citConfirmBody,
+ data,
+ 8000,
+ true,
+ "automatic",
+ "new_mandate",
+ globalState
+ );
+
+ if (shouldContinue)
+ shouldContinue = utils.should_continue_further(data);
+ });
+ }
+ );
});