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

ci(cypress): add tests for mit payment without billing (#7326)

likhinbopanna0c952cc14865
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Commons.js b/cypress-tests/cypress/e2e/configs/Payment/Commons.js
index 6cf29db5f1..963a0e50ab 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Commons.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Commons.js
@@ -1380,6 +1380,17 @@ export const connectorDetails = {
},
},
}),
+ MITWithoutBillingAddress: getCustomExchange({
+ Request: {
+ billing: null,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ }),
PaymentWithoutBilling: {
Request: {
currency: "USD",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js
index 74ffd40369..43834c7727 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js
@@ -350,6 +350,19 @@ export const connectorDetails = {
},
},
},
+ MITWithoutBillingAddress: {
+ Request: {
+ billing: null,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "failed",
+ error_code: "The currency not allow for the RecordType",
+ error_message: "The currency not allow for the RecordType",
+ },
+ },
+ },
MITManualCapture: {
Request: {},
Response: {
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js
index ceefef888f..7f54afea48 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js
@@ -310,6 +310,65 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
}
);
+ context("Card - MIT without billing address", () => {
+ let shouldContinue = true;
+
+ beforeEach(function () {
+ if (!shouldContinue) {
+ this.skip();
+ }
+ });
+
+ it("Create No 3DS Payment Intent", () => {
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["PaymentIntentOffSession"];
+
+ cy.createPaymentIntentTest(
+ fixtures.createPaymentBody,
+ data,
+ "no_three_ds",
+ "automatic",
+ globalState
+ );
+
+ if (shouldContinue) shouldContinue = utils.should_continue_further(data);
+ });
+
+ it("Confirm No 3DS CIT", () => {
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["PaymentMethodIdMandateNo3DSAutoCapture"];
+
+ cy.citForMandatesCallTest(
+ fixtures.citConfirmBody,
+ data,
+ 6000,
+ true,
+ "automatic",
+ "new_mandate",
+ globalState
+ );
+
+ if (shouldContinue) shouldContinue = utils.should_continue_further(data);
+ });
+
+ it("Confirm No 3DS MIT", () => {
+ const data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["MITWithoutBillingAddress"];
+
+ cy.mitUsingPMId(
+ fixtures.pmIdConfirmBody,
+ data,
+ 6000,
+ true,
+ "automatic",
+ globalState
+ );
+ });
+ });
+
context(
"Card - ThreeDS Create + Confirm Automatic CIT and MIT payment flow test",
() => {