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
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
ci(cypress): Add test for external vault (#11638)
Gnanasundari24560f01dda700
diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.ymlindex 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: bashrun: |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: bashrun: |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: bashrun: |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: bashrun: |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.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00000-CoreFlows.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/00-CoreFlows.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00001-AccountCreate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/01-AccountCreate.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00001-AccountCreate.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/01-AccountCreate.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00002-CustomerCreate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/02-CustomerCreate.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00002-CustomerCreate.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/02-CustomerCreate.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00003-ConnectorCreate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/03-ConnectorCreate.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00003-ConnectorCreate.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/03-ConnectorCreate.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00004-NoThreeDSAutoCapture.cy.js b/cypress-tests/cypress/e2e/spec/Payment/04-NoThreeDSAutoCapture.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00004-NoThreeDSAutoCapture.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/04-NoThreeDSAutoCapture.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00005-ThreeDSAutoCapture.cy.js b/cypress-tests/cypress/e2e/spec/Payment/05-ThreeDSAutoCapture.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00005-ThreeDSAutoCapture.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/05-ThreeDSAutoCapture.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00006-NoThreeDSManualCapture.cy.js b/cypress-tests/cypress/e2e/spec/Payment/06-NoThreeDSManualCapture.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00006-NoThreeDSManualCapture.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/06-NoThreeDSManualCapture.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00007-VoidPayment.cy.js b/cypress-tests/cypress/e2e/spec/Payment/07-VoidPayment.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00007-VoidPayment.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/07-VoidPayment.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00008-SyncPayment.cy.js b/cypress-tests/cypress/e2e/spec/Payment/08-SyncPayment.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00008-SyncPayment.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/08-SyncPayment.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.js b/cypress-tests/cypress/e2e/spec/Payment/09-RefundPayment.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/09-RefundPayment.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00010-SyncRefund.cy.js b/cypress-tests/cypress/e2e/spec/Payment/10-SyncRefund.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00010-SyncRefund.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/10-SyncRefund.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00011-CreateSingleuseMandate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/11-CreateSingleuseMandate.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00011-CreateSingleuseMandate.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/11-CreateSingleuseMandate.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00012-CreateMultiuseMandate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/12-CreateMultiuseMandate.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00012-CreateMultiuseMandate.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/12-CreateMultiuseMandate.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00013-ListAndRevokeMandate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/13-ListAndRevokeMandate.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00013-ListAndRevokeMandate.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/13-ListAndRevokeMandate.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.js b/cypress-tests/cypress/e2e/spec/Payment/14-SaveCardFlow.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/14-SaveCardFlow.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00015-ZeroAuthMandate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/15-ZeroAuthMandate.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00015-ZeroAuthMandate.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/15-ZeroAuthMandate.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00016-ThreeDSManualCapture.cy.js b/cypress-tests/cypress/e2e/spec/Payment/16-ThreeDSManualCapture.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00016-ThreeDSManualCapture.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/16-ThreeDSManualCapture.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00017-BankTransfers.cy.js b/cypress-tests/cypress/e2e/spec/Payment/17-BankTransfers.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00017-BankTransfers.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/17-BankTransfers.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00018-BankRedirect.cy.js b/cypress-tests/cypress/e2e/spec/Payment/18-BankRedirect.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00018-BankRedirect.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/18-BankRedirect.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00019-Wallet.cy.js b/cypress-tests/cypress/e2e/spec/Payment/19-Wallet.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00019-Wallet.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/19-Wallet.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00020-MandatesUsingPMID.cy.js b/cypress-tests/cypress/e2e/spec/Payment/20-MandatesUsingPMID.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00020-MandatesUsingPMID.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/20-MandatesUsingPMID.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00021-MandatesUsingNTIDProxy.cy.js b/cypress-tests/cypress/e2e/spec/Payment/21-MandatesUsingNTIDProxy.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00021-MandatesUsingNTIDProxy.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/21-MandatesUsingNTIDProxy.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00022-UPI.cy.js b/cypress-tests/cypress/e2e/spec/Payment/22-UPI.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00022-UPI.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/22-UPI.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00023-Variations.cy.js b/cypress-tests/cypress/e2e/spec/Payment/23-Variations.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00023-Variations.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/23-Variations.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00024-PaymentMethods.cy.js b/cypress-tests/cypress/e2e/spec/Payment/24-PaymentMethods.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00024-PaymentMethods.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/24-PaymentMethods.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00025-ConnectorAgnosticNTID.cy.js b/cypress-tests/cypress/e2e/spec/Payment/25-ConnectorAgnosticNTID.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00025-ConnectorAgnosticNTID.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/25-ConnectorAgnosticNTID.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00026-SessionCall.cy.js b/cypress-tests/cypress/e2e/spec/Payment/26-SessionCall.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00026-SessionCall.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/26-SessionCall.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00027-DeletedCustomerPsyncFlow.cy.js b/cypress-tests/cypress/e2e/spec/Payment/27-DeletedCustomerPsyncFlow.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00027-DeletedCustomerPsyncFlow.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/27-DeletedCustomerPsyncFlow.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00028-BusinessProfileConfigs.cy.js b/cypress-tests/cypress/e2e/spec/Payment/28-BusinessProfileConfigs.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00028-BusinessProfileConfigs.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/28-BusinessProfileConfigs.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00029-IncrementalAuth.cy.js b/cypress-tests/cypress/e2e/spec/Payment/29-IncrementalAuth.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00029-IncrementalAuth.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/29-IncrementalAuth.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00030-Overcapture.cy.js b/cypress-tests/cypress/e2e/spec/Payment/30-Overcapture.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00030-Overcapture.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/30-Overcapture.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00031-RealTimePayment.cy.js b/cypress-tests/cypress/e2e/spec/Payment/31-RealTimePayment.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00031-RealTimePayment.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/31-RealTimePayment.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00032-DDCRaceCondition.cy.js b/cypress-tests/cypress/e2e/spec/Payment/32-DDCRaceCondition.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00032-DDCRaceCondition.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/32-DDCRaceCondition.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00033-ManualRetry.cy.js b/cypress-tests/cypress/e2e/spec/Payment/33-ManualRetry.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00033-ManualRetry.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/33-ManualRetry.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00034-CustomerListTests.cy.js b/cypress-tests/cypress/e2e/spec/Payment/34-CustomerListTests.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00034-CustomerListTests.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/34-CustomerListTests.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00035-PaymentsEligibilityAPI.cy.js b/cypress-tests/cypress/e2e/spec/Payment/35-PaymentsEligibilityAPI.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00035-PaymentsEligibilityAPI.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/35-PaymentsEligibilityAPI.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00036-DiffCheckValidation.cy.js b/cypress-tests/cypress/e2e/spec/Payment/36-DiffCheckValidation.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00036-DiffCheckValidation.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/36-DiffCheckValidation.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00037-RewardPayment.cy.js b/cypress-tests/cypress/e2e/spec/Payment/37-RewardPayment.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00037-RewardPayment.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/37-RewardPayment.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00038-CardInstallments.cy.js b/cypress-tests/cypress/e2e/spec/Payment/38-CardInstallments.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00038-CardInstallments.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/38-CardInstallments.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00039-CryptoPayment.cy.js b/cypress-tests/cypress/e2e/spec/Payment/39-CryptoPayment.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00039-CryptoPayment.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/39-CryptoPayment.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/40-ExternalVault.cy.js b/cypress-tests/cypress/e2e/spec/Payment/40-ExternalVault.cy.jsnew file mode 100644index 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.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00040-DynamicFields.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/41-DynamicFields.cy.jsdiff --git a/cypress-tests/cypress/e2e/spec/Payment/00041-PaymentWebhook.cy.js b/cypress-tests/cypress/e2e/spec/Payment/42-PaymentWebhook.cy.jssimilarity index 100%rename from cypress-tests/cypress/e2e/spec/Payment/00041-PaymentWebhook.cy.jsrename to cypress-tests/cypress/e2e/spec/Payment/42-PaymentWebhook.cy.jsdiff --git a/cypress-tests/cypress/support/commands.js b/cypress-tests/cypress/support/commands.jsindex 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) => {