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 test for external vault (#11638)

Gnanasundari24560f01dda700
diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.yml
index 37676a9c00..e02f19e485 100644
--- a/.github/workflows/cypress-tests-runner.yml
+++ b/.github/workflows/cypress-tests-runner.yml
@@ -289,7 +289,7 @@ jobs:
CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}
CONNECTOR_CREDS_S3_BUCKET_URI: ${{ secrets.CONNECTOR_CREDS_S3_BUCKET_URI}}
DESTINATION_FILE_NAME: "creds.json.gpg"
- S3_SOURCE_FILE_NAME: "30a03d83-4c21-440b-ab65-c70397f255ae.json.gpg"
+ S3_SOURCE_FILE_NAME: "68bba6ea-3c75-440f-9c4b-00a30ecbb79d.json.gpg"
shell: bash
run: |
mkdir -p ".github/secrets" ".github/test"
@@ -489,7 +489,7 @@ jobs:
CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}
CONNECTOR_CREDS_S3_BUCKET_URI: ${{ secrets.CONNECTOR_CREDS_S3_BUCKET_URI}}
DESTINATION_FILE_NAME: "creds.json.gpg"
- S3_SOURCE_FILE_NAME: "30a03d83-4c21-440b-ab65-c70397f255ae.json.gpg"
+ S3_SOURCE_FILE_NAME: "68bba6ea-3c75-440f-9c4b-00a30ecbb79d.json.gpg"
shell: bash
run: |
mkdir -p ".github/secrets" ".github/test"
@@ -752,7 +752,7 @@ jobs:
CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}
CONNECTOR_CREDS_S3_BUCKET_URI: ${{ secrets.CONNECTOR_CREDS_S3_BUCKET_URI}}
DESTINATION_FILE_NAME: "creds.json.gpg"
- S3_SOURCE_FILE_NAME: "30a03d83-4c21-440b-ab65-c70397f255ae.json.gpg"
+ S3_SOURCE_FILE_NAME: "68bba6ea-3c75-440f-9c4b-00a30ecbb79d.json.gpg"
shell: bash
run: |
mkdir -p ".github/secrets" ".github/test"
@@ -1128,7 +1128,7 @@ jobs:
CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}
CONNECTOR_CREDS_S3_BUCKET_URI: ${{ secrets.CONNECTOR_CREDS_S3_BUCKET_URI}}
DESTINATION_FILE_NAME: "creds.json.gpg"
- S3_SOURCE_FILE_NAME: "30a03d83-4c21-440b-ab65-c70397f255ae.json.gpg"
+ S3_SOURCE_FILE_NAME: "68bba6ea-3c75-440f-9c4b-00a30ecbb79d.json.gpg"
shell: bash
run: |
mkdir -p ".github/secrets" ".github/test"
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00000-CoreFlows.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00-CoreFlows.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00000-CoreFlows.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/00-CoreFlows.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00001-AccountCreate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/01-AccountCreate.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00001-AccountCreate.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/01-AccountCreate.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00002-CustomerCreate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/02-CustomerCreate.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00002-CustomerCreate.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/02-CustomerCreate.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00003-ConnectorCreate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/03-ConnectorCreate.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00003-ConnectorCreate.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/03-ConnectorCreate.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00004-NoThreeDSAutoCapture.cy.js b/cypress-tests/cypress/e2e/spec/Payment/04-NoThreeDSAutoCapture.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00004-NoThreeDSAutoCapture.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/04-NoThreeDSAutoCapture.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00005-ThreeDSAutoCapture.cy.js b/cypress-tests/cypress/e2e/spec/Payment/05-ThreeDSAutoCapture.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00005-ThreeDSAutoCapture.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/05-ThreeDSAutoCapture.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00006-NoThreeDSManualCapture.cy.js b/cypress-tests/cypress/e2e/spec/Payment/06-NoThreeDSManualCapture.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00006-NoThreeDSManualCapture.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/06-NoThreeDSManualCapture.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00007-VoidPayment.cy.js b/cypress-tests/cypress/e2e/spec/Payment/07-VoidPayment.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00007-VoidPayment.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/07-VoidPayment.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00008-SyncPayment.cy.js b/cypress-tests/cypress/e2e/spec/Payment/08-SyncPayment.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00008-SyncPayment.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/08-SyncPayment.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.js b/cypress-tests/cypress/e2e/spec/Payment/09-RefundPayment.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/09-RefundPayment.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00010-SyncRefund.cy.js b/cypress-tests/cypress/e2e/spec/Payment/10-SyncRefund.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00010-SyncRefund.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/10-SyncRefund.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00011-CreateSingleuseMandate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/11-CreateSingleuseMandate.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00011-CreateSingleuseMandate.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/11-CreateSingleuseMandate.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00012-CreateMultiuseMandate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/12-CreateMultiuseMandate.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00012-CreateMultiuseMandate.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/12-CreateMultiuseMandate.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00013-ListAndRevokeMandate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/13-ListAndRevokeMandate.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00013-ListAndRevokeMandate.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/13-ListAndRevokeMandate.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.js b/cypress-tests/cypress/e2e/spec/Payment/14-SaveCardFlow.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/14-SaveCardFlow.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00015-ZeroAuthMandate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/15-ZeroAuthMandate.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00015-ZeroAuthMandate.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/15-ZeroAuthMandate.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00016-ThreeDSManualCapture.cy.js b/cypress-tests/cypress/e2e/spec/Payment/16-ThreeDSManualCapture.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00016-ThreeDSManualCapture.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/16-ThreeDSManualCapture.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00017-BankTransfers.cy.js b/cypress-tests/cypress/e2e/spec/Payment/17-BankTransfers.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00017-BankTransfers.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/17-BankTransfers.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00018-BankRedirect.cy.js b/cypress-tests/cypress/e2e/spec/Payment/18-BankRedirect.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00018-BankRedirect.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/18-BankRedirect.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00019-Wallet.cy.js b/cypress-tests/cypress/e2e/spec/Payment/19-Wallet.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00019-Wallet.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/19-Wallet.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00020-MandatesUsingPMID.cy.js b/cypress-tests/cypress/e2e/spec/Payment/20-MandatesUsingPMID.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00020-MandatesUsingPMID.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/20-MandatesUsingPMID.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00021-MandatesUsingNTIDProxy.cy.js b/cypress-tests/cypress/e2e/spec/Payment/21-MandatesUsingNTIDProxy.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00021-MandatesUsingNTIDProxy.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/21-MandatesUsingNTIDProxy.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00022-UPI.cy.js b/cypress-tests/cypress/e2e/spec/Payment/22-UPI.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00022-UPI.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/22-UPI.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00023-Variations.cy.js b/cypress-tests/cypress/e2e/spec/Payment/23-Variations.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00023-Variations.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/23-Variations.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00024-PaymentMethods.cy.js b/cypress-tests/cypress/e2e/spec/Payment/24-PaymentMethods.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00024-PaymentMethods.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/24-PaymentMethods.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00025-ConnectorAgnosticNTID.cy.js b/cypress-tests/cypress/e2e/spec/Payment/25-ConnectorAgnosticNTID.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00025-ConnectorAgnosticNTID.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/25-ConnectorAgnosticNTID.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00026-SessionCall.cy.js b/cypress-tests/cypress/e2e/spec/Payment/26-SessionCall.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00026-SessionCall.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/26-SessionCall.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00027-DeletedCustomerPsyncFlow.cy.js b/cypress-tests/cypress/e2e/spec/Payment/27-DeletedCustomerPsyncFlow.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00027-DeletedCustomerPsyncFlow.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/27-DeletedCustomerPsyncFlow.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00028-BusinessProfileConfigs.cy.js b/cypress-tests/cypress/e2e/spec/Payment/28-BusinessProfileConfigs.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00028-BusinessProfileConfigs.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/28-BusinessProfileConfigs.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00029-IncrementalAuth.cy.js b/cypress-tests/cypress/e2e/spec/Payment/29-IncrementalAuth.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00029-IncrementalAuth.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/29-IncrementalAuth.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00030-Overcapture.cy.js b/cypress-tests/cypress/e2e/spec/Payment/30-Overcapture.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00030-Overcapture.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/30-Overcapture.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00031-RealTimePayment.cy.js b/cypress-tests/cypress/e2e/spec/Payment/31-RealTimePayment.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00031-RealTimePayment.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/31-RealTimePayment.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00032-DDCRaceCondition.cy.js b/cypress-tests/cypress/e2e/spec/Payment/32-DDCRaceCondition.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00032-DDCRaceCondition.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/32-DDCRaceCondition.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00033-ManualRetry.cy.js b/cypress-tests/cypress/e2e/spec/Payment/33-ManualRetry.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00033-ManualRetry.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/33-ManualRetry.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00034-CustomerListTests.cy.js b/cypress-tests/cypress/e2e/spec/Payment/34-CustomerListTests.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00034-CustomerListTests.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/34-CustomerListTests.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00035-PaymentsEligibilityAPI.cy.js b/cypress-tests/cypress/e2e/spec/Payment/35-PaymentsEligibilityAPI.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00035-PaymentsEligibilityAPI.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/35-PaymentsEligibilityAPI.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00036-DiffCheckValidation.cy.js b/cypress-tests/cypress/e2e/spec/Payment/36-DiffCheckValidation.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00036-DiffCheckValidation.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/36-DiffCheckValidation.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00037-RewardPayment.cy.js b/cypress-tests/cypress/e2e/spec/Payment/37-RewardPayment.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00037-RewardPayment.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/37-RewardPayment.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00038-CardInstallments.cy.js b/cypress-tests/cypress/e2e/spec/Payment/38-CardInstallments.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00038-CardInstallments.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/38-CardInstallments.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00039-CryptoPayment.cy.js b/cypress-tests/cypress/e2e/spec/Payment/39-CryptoPayment.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00039-CryptoPayment.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/39-CryptoPayment.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/40-ExternalVault.cy.js b/cypress-tests/cypress/e2e/spec/Payment/40-ExternalVault.cy.js
new file mode 100644
index 0000000000..71bfc3a176
--- /dev/null
+++ b/cypress-tests/cypress/e2e/spec/Payment/40-ExternalVault.cy.js
@@ -0,0 +1,398 @@
+import * as fixtures from "../../../fixtures/imports";
+import State from "../../../utils/State";
+import getConnectorDetails, * as utils from "../../configs/Payment/Utils";
+
+let globalState;
+
+const VGS_CONNECTOR_NAME = "vgs";
+
+describe("External Vault (VGS) - Connector Integration Tests", () => {
+ before("seed global state", () => {
+ cy.task("getGlobalState").then((state) => {
+ globalState = new State(state);
+ });
+ });
+
+ after("flush global state", () => {
+ cy.task("setGlobalState", globalState.data);
+ });
+
+ context("1. VGS vault connector setup on existing profile", () => {
+ it("Create VGS vault connector (vault_processor) on existing profile", () => {
+ const vgsConnectorBody = Cypress._.cloneDeep(
+ fixtures.createConnectorBody
+ );
+ vgsConnectorBody.connector_name = VGS_CONNECTOR_NAME;
+ vgsConnectorBody.payment_methods_enabled = [];
+
+ cy.externalVaultConnectorCreateCallTest(vgsConnectorBody, globalState);
+ });
+
+ it("Update existing business profile to enable VGS as external vault", () => {
+ const vgsMcaId = globalState.get("vaultConnectorId");
+
+ const updateBusinessProfileBody = {
+ ...fixtures.businessProfile.bpUpdate,
+ is_external_vault_enabled: "enable",
+ external_vault_connector_details: {
+ vault_connector_id: vgsMcaId,
+ },
+ };
+
+ cy.UpdateBusinessProfileTest(
+ updateBusinessProfileBody,
+ false, //is_connector_agnostic_mit_enabled
+ false, //collect_billing_details_from_wallet_connector
+ false, //collect_shipping_details_from_wallet_connector
+ false, //always_collect_billing_details_from_wallet_connector
+ false, //always_collect_shipping_details_from_wallet_connector
+ globalState
+ );
+ });
+ });
+
+ context(
+ "Save card for NoThreeDS automatic capture payment - Create+Confirm [on_session]",
+ () => {
+ it("Create Customer -> Create and Confirm Payment -> Retrieve Payment -> List Customer PMs -> Create Payment Intent -> Save Card Confirm", () => {
+ let shouldContinue = true;
+
+ cy.step("Create Customer", () => {
+ cy.createCustomerCallTest(fixtures.customerCreateBody, globalState);
+ });
+
+ cy.step("Create and Confirm Payment", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: Create and Confirm Payment");
+ return;
+ }
+ const createConfirmData = getConnectorDetails(
+ globalState.get("connectorId")
+ )["card_pm"]["SaveCardUseNo3DSAutoCapture"];
+ cy.createConfirmPaymentTest(
+ fixtures.createConfirmPaymentBody,
+ createConfirmData,
+ "no_three_ds",
+ "automatic",
+ globalState
+ );
+ if (!utils.should_continue_further(createConfirmData)) {
+ shouldContinue = false;
+ }
+ });
+
+ cy.step("Retrieve Payment after Confirm", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: Retrieve Payment after Confirm");
+ return;
+ }
+ const createConfirmData = getConnectorDetails(
+ globalState.get("connectorId")
+ )["card_pm"]["SaveCardUseNo3DSAutoCapture"];
+ cy.retrievePaymentCallTest({ globalState, data: createConfirmData });
+ if (!utils.should_continue_further(createConfirmData)) {
+ shouldContinue = false;
+ }
+ });
+
+ cy.step("List Customer Payment Methods", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: List Customer Payment Methods");
+ return;
+ }
+ cy.listCustomerPMCallTest(globalState);
+ });
+
+ cy.step("Create Payment Intent", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: Create Payment Intent");
+ return;
+ }
+ const paymentIntentData = getConnectorDetails(
+ globalState.get("connectorId")
+ )["card_pm"]["PaymentIntent"];
+ cy.createPaymentIntentTest(
+ fixtures.createPaymentBody,
+ paymentIntentData,
+ "no_three_ds",
+ "automatic",
+ globalState
+ );
+ if (!utils.should_continue_further(paymentIntentData)) {
+ shouldContinue = false;
+ }
+ });
+
+ cy.step("Save Card Confirm Call", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: Save Card Confirm Call");
+ return;
+ }
+ const saveCardBody = Cypress._.cloneDeep(
+ fixtures.saveCardConfirmBody
+ );
+ const saveCardConfirmData = getConnectorDetails(
+ globalState.get("connectorId")
+ )["card_pm"]["SaveCardUseNo3DSAutoCapture"];
+ cy.saveCardConfirmCallTest(
+ saveCardBody,
+ saveCardConfirmData,
+ globalState
+ );
+ });
+ });
+ }
+ );
+
+ context(
+ "Save card for NoThreeDS manual capture payment - Create+Confirm [on_session]",
+ () => {
+ it("Create Customer -> Create and Confirm Payment -> Retrieve Payment -> List Customer PMs -> Create Payment Intent -> Save Card Confirm -> Retrieve Payment -> Capture -> Retrieve after Capture", () => {
+ let shouldContinue = true;
+
+ cy.step("Create Customer", () => {
+ cy.createCustomerCallTest(fixtures.customerCreateBody, globalState);
+ });
+
+ cy.step("Create and Confirm Payment", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: Create and Confirm Payment");
+ return;
+ }
+ const createConfirmData = getConnectorDetails(
+ globalState.get("connectorId")
+ )["card_pm"]["SaveCardUseNo3DSAutoCapture"];
+ cy.createConfirmPaymentTest(
+ fixtures.createConfirmPaymentBody,
+ createConfirmData,
+ "no_three_ds",
+ "automatic",
+ globalState
+ );
+ if (!utils.should_continue_further(createConfirmData)) {
+ shouldContinue = false;
+ }
+ });
+
+ cy.step("Retrieve Payment after Confirm", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: Retrieve Payment after Confirm");
+ return;
+ }
+ const createConfirmData = getConnectorDetails(
+ globalState.get("connectorId")
+ )["card_pm"]["SaveCardUseNo3DSAutoCapture"];
+ cy.retrievePaymentCallTest({ globalState, data: createConfirmData });
+ if (!utils.should_continue_further(createConfirmData)) {
+ shouldContinue = false;
+ }
+ });
+
+ cy.step("List Customer Payment Methods", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: List Customer Payment Methods");
+ return;
+ }
+ cy.listCustomerPMCallTest(globalState);
+ });
+
+ cy.step("Create Payment Intent (manual capture)", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: Create Payment Intent");
+ return;
+ }
+ const paymentIntentData = getConnectorDetails(
+ globalState.get("connectorId")
+ )["card_pm"]["PaymentIntent"];
+ cy.createPaymentIntentTest(
+ fixtures.createPaymentBody,
+ paymentIntentData,
+ "no_three_ds",
+ "manual",
+ globalState
+ );
+ if (!utils.should_continue_further(paymentIntentData)) {
+ shouldContinue = false;
+ }
+ });
+
+ cy.step("Save Card Confirm Call", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: Save Card Confirm Call");
+ return;
+ }
+ const saveCardBody = Cypress._.cloneDeep(
+ fixtures.saveCardConfirmBody
+ );
+ const saveCardConfirmData = getConnectorDetails(
+ globalState.get("connectorId")
+ )["card_pm"]["SaveCardUseNo3DSManualCapture"];
+ cy.saveCardConfirmCallTest(
+ saveCardBody,
+ saveCardConfirmData,
+ globalState
+ );
+ if (!utils.should_continue_further(saveCardConfirmData)) {
+ shouldContinue = false;
+ }
+ });
+
+ cy.step("Retrieve Payment after Save Card Confirm", () => {
+ if (!shouldContinue) {
+ cy.task(
+ "cli_log",
+ "Skipping step: Retrieve Payment after Save Card Confirm"
+ );
+ return;
+ }
+ const saveCardConfirmData = getConnectorDetails(
+ globalState.get("connectorId")
+ )["card_pm"]["SaveCardUseNo3DSManualCapture"];
+ cy.retrievePaymentCallTest({
+ globalState,
+ data: saveCardConfirmData,
+ });
+ if (!utils.should_continue_further(saveCardConfirmData)) {
+ shouldContinue = false;
+ }
+ });
+
+ cy.step("Capture Payment", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: Capture Payment");
+ return;
+ }
+ const captureData = getConnectorDetails(
+ globalState.get("connectorId")
+ )["card_pm"]["Capture"];
+ cy.captureCallTest(fixtures.captureBody, captureData, globalState);
+ if (!utils.should_continue_further(captureData)) {
+ shouldContinue = false;
+ }
+ });
+
+ cy.step("Retrieve Payment after Capture", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: Retrieve Payment after Capture");
+ return;
+ }
+ const captureData = getConnectorDetails(
+ globalState.get("connectorId")
+ )["card_pm"]["Capture"];
+ cy.retrievePaymentCallTest({ globalState, data: captureData });
+ });
+ });
+ }
+ );
+
+ context(
+ "Save card for NoThreeDS automatic capture payment [off_session]",
+ () => {
+ it("Create Customer -> Create and Confirm Payment -> Retrieve Payment -> List Customer PMs -> Create Payment Intent -> Save Card Confirm", () => {
+ let shouldContinue = true;
+
+ cy.step("Create Customer", () => {
+ cy.createCustomerCallTest(fixtures.customerCreateBody, globalState);
+ });
+
+ cy.step("Create and Confirm Payment", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: Create and Confirm Payment");
+ return;
+ }
+ const createConfirmData = getConnectorDetails(
+ globalState.get("connectorId")
+ )["card_pm"]["SaveCardUseNo3DSAutoCaptureOffSession"];
+ cy.createConfirmPaymentTest(
+ fixtures.createConfirmPaymentBody,
+ createConfirmData,
+ "no_three_ds",
+ "automatic",
+ globalState
+ );
+ if (!utils.should_continue_further(createConfirmData)) {
+ shouldContinue = false;
+ }
+ });
+
+ cy.step("Retrieve Payment after Confirm", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: Retrieve Payment after Confirm");
+ return;
+ }
+ const createConfirmData = getConnectorDetails(
+ globalState.get("connectorId")
+ )["card_pm"]["SaveCardUseNo3DSAutoCaptureOffSession"];
+ cy.retrievePaymentCallTest({ globalState, data: createConfirmData });
+ if (!utils.should_continue_further(createConfirmData)) {
+ shouldContinue = false;
+ }
+ });
+
+ cy.step("List Customer Payment Methods", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: List Customer Payment Methods");
+ return;
+ }
+ cy.listCustomerPMCallTest(globalState);
+ });
+
+ cy.step("Create Payment Intent", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: Create Payment Intent");
+ return;
+ }
+ const paymentIntentData = getConnectorDetails(
+ globalState.get("connectorId")
+ )["card_pm"]["PaymentIntentOffSession"];
+ cy.createPaymentIntentTest(
+ fixtures.createPaymentBody,
+ paymentIntentData,
+ "no_three_ds",
+ "automatic",
+ globalState
+ );
+ if (!utils.should_continue_further(paymentIntentData)) {
+ shouldContinue = false;
+ }
+ });
+
+ cy.step("Save Card Confirm Call", () => {
+ if (!shouldContinue) {
+ cy.task("cli_log", "Skipping step: Save Card Confirm Call");
+ return;
+ }
+ const saveCardBody = Cypress._.cloneDeep(
+ fixtures.saveCardConfirmBody
+ );
+ const saveCardConfirmData = getConnectorDetails(
+ globalState.get("connectorId")
+ )["card_pm"]["SaveCardConfirmAutoCaptureOffSession"];
+ cy.saveCardConfirmCallTest(
+ saveCardBody,
+ saveCardConfirmData,
+ globalState
+ );
+ });
+ });
+ }
+ );
+
+ context("Remove VGS external vault from business profile", () => {
+ it("Remove external_vault_connector_id from business profile", () => {
+ const updateBusinessProfileBody = {
+ is_external_vault_enabled: "disable",
+ };
+
+ cy.UpdateBusinessProfileTest(
+ updateBusinessProfileBody,
+ false, //is_connector_agnostic_mit_enabled
+ false, //collect_billing_details_from_wallet_connector
+ false, //collect_shipping_details_from_wallet_connector
+ false, //always_collect_billing_details_from_wallet_connector
+ false, //always_collect_shipping_details_from_wallet_connector
+ globalState
+ );
+ });
+ });
+});
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00040-DynamicFields.cy.js b/cypress-tests/cypress/e2e/spec/Payment/41-DynamicFields.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00040-DynamicFields.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/41-DynamicFields.cy.js
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00041-PaymentWebhook.cy.js b/cypress-tests/cypress/e2e/spec/Payment/42-PaymentWebhook.cy.js
similarity index 100%
rename from cypress-tests/cypress/e2e/spec/Payment/00041-PaymentWebhook.cy.js
rename to cypress-tests/cypress/e2e/spec/Payment/42-PaymentWebhook.cy.js
diff --git a/cypress-tests/cypress/support/commands.js b/cypress-tests/cypress/support/commands.js
index 2cf557cdc0..0a06abe9f1 100644
--- a/cypress-tests/cypress/support/commands.js
+++ b/cypress-tests/cypress/support/commands.js
@@ -1129,6 +1129,90 @@ Cypress.Commands.add(
}
);
+Cypress.Commands.add(
+ "externalVaultConnectorCreateCallTest",
+ (
+ createConnectorBody,
+ globalState,
+ profilePrefix = "profile",
+ mcaPrefix = "vaultConnector",
+ expectedStatus = 200
+ ) => {
+ const apiKey = globalState.get("apiKey");
+ const baseUrl = globalState.get("baseUrl");
+ const merchantId = globalState.get("merchantId");
+ const profileId = globalState.get(`${profilePrefix}Id`);
+ const url = `${baseUrl}/account/${merchantId}/connectors`;
+
+ createConnectorBody.connector_type = "vault_processor";
+ createConnectorBody.profile_id = profileId;
+
+ cy.readFile(globalState.get("connectorAuthFilePath")).then(
+ (jsonContent) => {
+ const { authDetails } = getValueByKey(
+ JSON.stringify(jsonContent),
+ createConnectorBody.connector_name
+ );
+
+ if (authDetails && authDetails.connector_account_details) {
+ createConnectorBody.connector_account_details =
+ authDetails.connector_account_details;
+ }
+
+ if (authDetails && authDetails.metadata) {
+ createConnectorBody.metadata = {
+ ...createConnectorBody.metadata,
+ ...authDetails.metadata,
+ };
+ }
+
+ cy.request({
+ method: "POST",
+ url,
+ headers: {
+ Accept: "application/json",
+ "Content-Type": "application/json",
+ "api-key": apiKey,
+ },
+ body: createConnectorBody,
+ failOnStatusCode: false,
+ }).then((response) => {
+ logRequestId(response.headers["x-request-id"]);
+
+ cy.wrap(response).then(() => {
+ if (expectedStatus === 200) {
+ if (response.status === 200) {
+ expect(response.body.connector_name).to.equal(
+ createConnectorBody.connector_name
+ );
+ expect(response.body.connector_type).to.equal(
+ "vault_processor"
+ );
+ expect(response.body).to.have.property("merchant_connector_id")
+ .and.to.not.be.empty;
+ globalState.set(
+ `${mcaPrefix}Id`,
+ response.body.merchant_connector_id
+ );
+ } else {
+ cy.task(
+ "cli_log",
+ "response status -> " + JSON.stringify(response.status)
+ );
+ throw new Error(
+ `External Vault Connector Create Call Failed ${response.body.error.message}`
+ );
+ }
+ } else {
+ expect(response.status).to.equal(expectedStatus);
+ }
+ });
+ });
+ }
+ );
+ }
+);
+
Cypress.Commands.add(
"createPayoutConnectorCallTest",
(connectorType, createConnectorBody, globalState) => {