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 off-session save card flows (#5570)

likhinbopanna4e7db9d1ad56
diff --git a/cypress-tests/cypress/e2e/PaymentTest/00013-SaveCardFlow.cy.js b/cypress-tests/cypress/e2e/PaymentTest/00013-SaveCardFlow.cy.js
index f4d479bbdd..17dc546a3f 100644
--- a/cypress-tests/cypress/e2e/PaymentTest/00013-SaveCardFlow.cy.js
+++ b/cypress-tests/cypress/e2e/PaymentTest/00013-SaveCardFlow.cy.js
@@ -3,6 +3,7 @@ import State from "../../utils/State";
import getConnectorDetails, * as utils from "../PaymentUtils/Utils";
let globalState;
+let saveCardBody;
describe("Card - SaveCard payment flow test", () => {
before("seed global state", () => {
@@ -11,12 +12,17 @@ describe("Card - SaveCard payment flow test", () => {
});
});
+ after("flush global state", () => {
+ cy.task("setGlobalState", globalState.data);
+ });
+
context(
- "Save card for NoThreeDS automatic capture payment- Create+Confirm",
+ "Save card for NoThreeDS automatic capture payment- Create+Confirm [on_session]",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
+ saveCardBody = Cypress._.cloneDeep(fixtures.saveCardConfirmBody);
if (!should_continue) {
this.skip();
}
@@ -77,7 +83,7 @@ describe("Card - SaveCard payment flow test", () => {
let req_data = data["Request"];
let res_data = data["Response"];
cy.saveCardConfirmCallTest(
- fixtures.saveCardConfirmBody,
+ saveCardBody,
req_data,
res_data,
globalState
@@ -89,11 +95,12 @@ describe("Card - SaveCard payment flow test", () => {
);
context(
- "Save card for NoThreeDS manual full capture payment- Create+Confirm",
+ "Save card for NoThreeDS manual full capture payment- Create+Confirm [on_session]",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
+ saveCardBody = Cypress._.cloneDeep(fixtures.saveCardConfirmBody);
if (!should_continue) {
this.skip();
}
@@ -154,7 +161,7 @@ describe("Card - SaveCard payment flow test", () => {
let req_data = data["Request"];
let res_data = data["Response"];
cy.saveCardConfirmCallTest(
- fixtures.saveCardConfirmBody,
+ saveCardBody,
req_data,
res_data,
globalState
@@ -187,11 +194,12 @@ describe("Card - SaveCard payment flow test", () => {
);
context(
- "Save card for NoThreeDS manual partial capture payment- Create + Confirm",
+ "Save card for NoThreeDS manual partial capture payment- Create + Confirm [on_session]",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
+ saveCardBody = Cypress._.cloneDeep(fixtures.saveCardConfirmBody);
if (!should_continue) {
this.skip();
}
@@ -252,7 +260,7 @@ describe("Card - SaveCard payment flow test", () => {
let req_data = data["Request"];
let res_data = data["Response"];
cy.saveCardConfirmCallTest(
- fixtures.saveCardConfirmBody,
+ saveCardBody,
req_data,
res_data,
globalState
@@ -282,4 +290,202 @@ describe("Card - SaveCard payment flow test", () => {
});
}
);
+
+ context(
+ "Save card for NoThreeDS automatic capture payment [off_session]",
+ () => {
+ let should_continue = true; // variable that will be used to skip tests if a previous test fails
+
+ beforeEach(function () {
+ saveCardBody = Cypress._.cloneDeep(fixtures.saveCardConfirmBody);
+ if (!should_continue) {
+ this.skip();
+ }
+ });
+
+ it("customer-create-call-test", () => {
+ cy.createCustomerCallTest(fixtures.customerCreateBody, globalState);
+ });
+
+ it("create+confirm-payment-call-test", () => {
+ let data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["SaveCardUseNo3DSAutoCaptureOffSession"];
+ let req_data = data["Request"];
+ let res_data = data["Response"];
+ cy.createConfirmPaymentTest(
+ fixtures.createConfirmPaymentBody,
+ req_data,
+ res_data,
+ "no_three_ds",
+ "automatic",
+ globalState
+ );
+ if (should_continue)
+ should_continue = utils.should_continue_further(res_data);
+ });
+
+ it("retrieve-payment-call-test", () => {
+ cy.retrievePaymentCallTest(globalState);
+ });
+
+ it("retrieve-customerPM-call-test", () => {
+ cy.listCustomerPMCallTest(globalState);
+ });
+
+ it("create-payment-call-test", () => {
+ let data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["PaymentIntentOffSession"];
+ let req_data = data["Request"];
+ let res_data = data["Response"];
+ cy.createPaymentIntentTest(
+ fixtures.createPaymentBody,
+ req_data,
+ res_data,
+ "no_three_ds",
+ "automatic",
+ globalState
+ );
+ if (should_continue)
+ should_continue = utils.should_continue_further(res_data);
+ });
+
+ it("confirm-save-card-payment-call-test", () => {
+ let data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["SaveCardConfirmAutoCaptureOffSession"];
+ let req_data = data["Request"];
+ let res_data = data["Response"];
+
+ cy.saveCardConfirmCallTest(
+ saveCardBody,
+ req_data,
+ res_data,
+ globalState
+ );
+ if (should_continue)
+ should_continue = utils.should_continue_further(res_data);
+ });
+ }
+ );
+
+ context(
+ "Save card for NoThreeDS manual capture payment- Create+Confirm [off_session]",
+ () => {
+ let should_continue = true; // variable that will be used to skip tests if a previous test fails
+
+ beforeEach(function () {
+ saveCardBody = Cypress._.cloneDeep(fixtures.saveCardConfirmBody);
+ if (!should_continue) {
+ this.skip();
+ }
+ });
+
+ it("customer-create-call-test", () => {
+ cy.createCustomerCallTest(fixtures.customerCreateBody, globalState);
+ });
+
+ it("create+confirm-payment-call-test", () => {
+ let data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["SaveCardUseNo3DSManualCaptureOffSession"];
+ let req_data = data["Request"];
+ let res_data = data["Response"];
+ cy.createConfirmPaymentTest(
+ fixtures.createConfirmPaymentBody,
+ req_data,
+ res_data,
+ "no_three_ds",
+ "manual",
+ globalState
+ );
+ if (should_continue)
+ should_continue = utils.should_continue_further(res_data);
+ });
+
+ it("retrieve-payment-call-test", () => {
+ cy.retrievePaymentCallTest(globalState);
+ });
+ it("capture-call-test", () => {
+ let data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["Capture"];
+ let req_data = data["Request"];
+ let res_data = data["Response"];
+ cy.captureCallTest(
+ fixtures.captureBody,
+ req_data,
+ res_data,
+ 6500,
+ globalState
+ );
+ if (should_continue)
+ should_continue = utils.should_continue_further(res_data);
+ });
+
+ it("retrieve-customerPM-call-test", () => {
+ cy.listCustomerPMCallTest(globalState);
+ });
+
+ it("create-payment-call-test", () => {
+ let data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["PaymentIntentOffSession"];
+ let req_data = data["Request"];
+ let res_data = data["Response"];
+ cy.createPaymentIntentTest(
+ fixtures.createPaymentBody,
+ req_data,
+ res_data,
+ "no_three_ds",
+ "manual",
+ globalState
+ );
+ if (should_continue)
+ should_continue = utils.should_continue_further(res_data);
+ });
+
+ it("confirm-save-card-payment-call-test", () => {
+ let data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["SaveCardConfirmManualCaptureOffSession"];
+ let req_data = data["Request"];
+ let res_data = data["Response"];
+ cy.saveCardConfirmCallTest(
+ saveCardBody,
+ req_data,
+ res_data,
+ globalState
+ );
+ if (should_continue)
+ should_continue = utils.should_continue_further(res_data);
+ });
+
+ it("retrieve-payment-call-test", () => {
+ cy.retrievePaymentCallTest(globalState);
+ });
+
+ it("capture-call-test", () => {
+ let data = getConnectorDetails(globalState.get("connectorId"))[
+ "card_pm"
+ ]["Capture"];
+ let req_data = data["Request"];
+ let res_data = data["Response"];
+ cy.captureCallTest(
+ fixtures.captureBody,
+ req_data,
+ res_data,
+ 6500,
+ globalState
+ );
+ if (should_continue)
+ should_continue = utils.should_continue_further(res_data);
+ });
+
+ it("retrieve-payment-call-test", () => {
+ cy.retrievePaymentCallTest(globalState);
+ });
+ }
+ );
});
diff --git a/cypress-tests/cypress/e2e/PaymentUtils/Adyen.js b/cypress-tests/cypress/e2e/PaymentUtils/Adyen.js
index 526764b2b3..b32a42660a 100644
--- a/cypress-tests/cypress/e2e/PaymentUtils/Adyen.js
+++ b/cypress-tests/cypress/e2e/PaymentUtils/Adyen.js
@@ -69,6 +69,19 @@ export const connectorDetails = {
},
},
},
+ PaymentIntentOffSession: {
+ Request: {
+ currency: "USD",
+ customer_acceptance: null,
+ setup_future_usage: "off_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ },
+ },
+ },
"3DSManualCapture": {
Request: {
payment_method: "card",
@@ -379,6 +392,74 @@ export const connectorDetails = {
},
},
},
+ SaveCardUseNo3DSAutoCaptureOffSession: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ setup_future_usage: "off_session",
+ customer_acceptance: {
+ acceptance_type: "offline",
+ accepted_at: "1963-05-03T04:07:52.723Z",
+ online: {
+ ip_address: "127.0.0.1",
+ user_agent: "amet irure esse",
+ },
+ },
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ SaveCardUseNo3DSManualCaptureOffSession: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ setup_future_usage: "off_session",
+ customer_acceptance: {
+ acceptance_type: "offline",
+ accepted_at: "1963-05-03T04:07:52.723Z",
+ online: {
+ ip_address: "127.0.0.1",
+ user_agent: "amet irure esse",
+ },
+ },
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ SaveCardConfirmAutoCaptureOffSession: {
+ Request: {
+ setup_future_usage: "off_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ SaveCardConfirmManualCaptureOffSession: {
+ Request: {
+ setup_future_usage: "off_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
SaveCardUseNo3DSManualCapture: {
Request: {
payment_method: "card",
diff --git a/cypress-tests/cypress/e2e/PaymentUtils/BankOfAmerica.js b/cypress-tests/cypress/e2e/PaymentUtils/BankOfAmerica.js
index 675f17bbb0..074eb0422c 100644
--- a/cypress-tests/cypress/e2e/PaymentUtils/BankOfAmerica.js
+++ b/cypress-tests/cypress/e2e/PaymentUtils/BankOfAmerica.js
@@ -67,6 +67,19 @@ export const connectorDetails = {
},
},
},
+ PaymentIntentOffSession: {
+ Request: {
+ currency: "USD",
+ customer_acceptance: null,
+ setup_future_usage: "off_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ },
+ },
+ },
"3DSManualCapture": {
Request: {
payment_method: "card",
@@ -391,6 +404,74 @@ export const connectorDetails = {
},
},
},
+ SaveCardUseNo3DSAutoCaptureOffSession: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ setup_future_usage: "off_session",
+ customer_acceptance: {
+ acceptance_type: "offline",
+ accepted_at: "1963-05-03T04:07:52.723Z",
+ online: {
+ ip_address: "127.0.0.1",
+ user_agent: "amet irure esse",
+ },
+ },
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ SaveCardUseNo3DSManualCaptureOffSession: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ setup_future_usage: "off_session",
+ customer_acceptance: {
+ acceptance_type: "offline",
+ accepted_at: "1963-05-03T04:07:52.723Z",
+ online: {
+ ip_address: "127.0.0.1",
+ user_agent: "amet irure esse",
+ },
+ },
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ SaveCardConfirmAutoCaptureOffSession: {
+ Request: {
+ setup_future_usage: "off_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ SaveCardConfirmManualCaptureOffSession: {
+ Request: {
+ setup_future_usage: "off_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
SaveCardUseNo3DSManualCapture: {
Request: {
payment_method: "card",
diff --git a/cypress-tests/cypress/e2e/PaymentUtils/Commons.js b/cypress-tests/cypress/e2e/PaymentUtils/Commons.js
index 8fdeb7b5b9..b8f8750a11 100644
--- a/cypress-tests/cypress/e2e/PaymentUtils/Commons.js
+++ b/cypress-tests/cypress/e2e/PaymentUtils/Commons.js
@@ -563,6 +563,17 @@ export const connectorDetails = {
},
},
}),
+ PaymentIntentOffSession: getCustomExchange({
+ Request: {
+ currency: "USD",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ },
+ },
+ }),
"3DSManualCapture": getCustomExchange({
Request: {
payment_method: "card",
@@ -789,6 +800,50 @@ export const connectorDetails = {
},
},
}),
+ SaveCardUseNo3DSAutoCaptureOffSession: getCustomExchange({
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ setup_future_usage: "off_session",
+ customer_acceptance: {
+ acceptance_type: "offline",
+ accepted_at: "1963-05-03T04:07:52.723Z",
+ online: {
+ ip_address: "127.0.0.1",
+ user_agent: "amet irure esse",
+ },
+ },
+ },
+ }),
+ SaveCardUseNo3DSManualCaptureOffSession: getCustomExchange({
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ setup_future_usage: "off_session",
+ customer_acceptance: {
+ acceptance_type: "offline",
+ accepted_at: "1963-05-03T04:07:52.723Z",
+ online: {
+ ip_address: "127.0.0.1",
+ user_agent: "amet irure esse",
+ },
+ },
+ },
+ }),
+ SaveCardConfirmAutoCaptureOffSession: getCustomExchange({
+ Request: {
+ setup_future_usage: "off_session",
+ },
+ }),
+ SaveCardConfirmManualCaptureOffSession: getCustomExchange({
+ Request: {
+ setup_future_usage: "off_session",
+ },
+ }),
SaveCardUseNo3DSManualCapture: getCustomExchange({
Request: {
payment_method: "card",
diff --git a/cypress-tests/cypress/e2e/PaymentUtils/Cybersource.js b/cypress-tests/cypress/e2e/PaymentUtils/Cybersource.js
index 675f17bbb0..72b0af6a1b 100644
--- a/cypress-tests/cypress/e2e/PaymentUtils/Cybersource.js
+++ b/cypress-tests/cypress/e2e/PaymentUtils/Cybersource.js
@@ -67,6 +67,19 @@ export const connectorDetails = {
},
},
},
+ PaymentIntentOffSession: {
+ Request: {
+ currency: "USD",
+ customer_acceptance: null,
+ setup_future_usage: "off_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ },
+ },
+ },
"3DSManualCapture": {
Request: {
payment_method: "card",
@@ -147,10 +160,10 @@ export const connectorDetails = {
Response: {
status: 200,
body: {
- status: "succeeded",
+ status: "processing",
amount: 6500,
- amount_capturable: 0,
- amount_received: 6500,
+ amount_capturable: 6500,
+ amount_received: null,
},
},
},
@@ -159,10 +172,10 @@ export const connectorDetails = {
Response: {
status: 200,
body: {
- status: "partially_captured",
+ status: "processing",
amount: 6500,
- amount_capturable: 0,
- amount_received: 100,
+ amount_capturable: 6500,
+ amount_received: null,
},
},
},
@@ -391,6 +404,74 @@ export const connectorDetails = {
},
},
},
+ SaveCardUseNo3DSAutoCaptureOffSession: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ setup_future_usage: "off_session",
+ customer_acceptance: {
+ acceptance_type: "offline",
+ accepted_at: "1963-05-03T04:07:52.723Z",
+ online: {
+ ip_address: "127.0.0.1",
+ user_agent: "amet irure esse",
+ },
+ },
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ SaveCardUseNo3DSManualCaptureOffSession: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ setup_future_usage: "off_session",
+ customer_acceptance: {
+ acceptance_type: "offline",
+ accepted_at: "1963-05-03T04:07:52.723Z",
+ online: {
+ ip_address: "127.0.0.1",
+ user_agent: "amet irure esse",
+ },
+ },
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ SaveCardConfirmAutoCaptureOffSession: {
+ Request: {
+ setup_future_usage: "off_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ SaveCardConfirmManualCaptureOffSession: {
+ Request: {
+ setup_future_usage: "off_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
SaveCardUseNo3DSManualCapture: {
Request: {
payment_method: "card",
diff --git a/cypress-tests/cypress/e2e/PaymentUtils/Stripe.js b/cypress-tests/cypress/e2e/PaymentUtils/Stripe.js
index f289f6fc69..02f384d421 100644
--- a/cypress-tests/cypress/e2e/PaymentUtils/Stripe.js
+++ b/cypress-tests/cypress/e2e/PaymentUtils/Stripe.js
@@ -69,6 +69,19 @@ export const connectorDetails = {
},
},
},
+ PaymentIntentOffSession: {
+ Request: {
+ currency: "USD",
+ customer_acceptance: null,
+ setup_future_usage: "off_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ },
+ },
+ },
"3DSManualCapture": {
Request: {
payment_method: "card",
@@ -441,6 +454,78 @@ export const connectorDetails = {
},
},
},
+ SaveCardUseNo3DSAutoCaptureOffSession: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ setup_future_usage: "off_session",
+ customer_acceptance: {
+ acceptance_type: "offline",
+ accepted_at: "1963-05-03T04:07:52.723Z",
+ online: {
+ ip_address: "127.0.0.1",
+ user_agent: "amet irure esse",
+ },
+ },
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ SaveCardUseNo3DSManualCaptureOffSession: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ setup_future_usage: "off_session",
+ customer_acceptance: {
+ acceptance_type: "offline",
+ accepted_at: "1963-05-03T04:07:52.723Z",
+ online: {
+ ip_address: "127.0.0.1",
+ user_agent: "amet irure esse",
+ },
+ },
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ SaveCardConfirmAutoCaptureOffSession: {
+ Request: {
+ setup_future_usage: "off_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ error_code: "No error code",
+ error_message:
+ "You cannot confirm with `off_session=true` when `setup_future_usage` is also set on the PaymentIntent. The customer needs to be on-session to perform the steps which may be required to set up the PaymentMethod for future usage. Please confirm this PaymentIntent with your customer on-session.",
+ },
+ },
+ },
+ SaveCardConfirmManualCaptureOffSession: {
+ Request: {
+ setup_future_usage: "off_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ error_code: "No error code",
+ error_message:
+ "You cannot confirm with `off_session=true` when `setup_future_usage` is also set on the PaymentIntent. The customer needs to be on-session to perform the steps which may be required to set up the PaymentMethod for future usage. Please confirm this PaymentIntent with your customer on-session.",
+ },
+ },
+ },
PaymentMethodIdMandateNo3DSManualCapture: {
Request: {
payment_method: "card",
diff --git a/cypress-tests/cypress/fixtures/save-card-confirm-body.json b/cypress-tests/cypress/fixtures/save-card-confirm-body.json
index 6ef086825f..17a860fd18 100644
--- a/cypress-tests/cypress/fixtures/save-card-confirm-body.json
+++ b/cypress-tests/cypress/fixtures/save-card-confirm-body.json
@@ -2,7 +2,6 @@
"client_secret": "{{client_secret}}",
"payment_method": "card",
"payment_token": "{{payment_token}}",
- "card_cvc": "card_cvc",
"billing": {
"address": {
"line1": "1467",
diff --git a/cypress-tests/cypress/support/commands.js b/cypress-tests/cypress/support/commands.js
index db2ad63773..62c70b98b9 100644
--- a/cypress-tests/cypress/support/commands.js
+++ b/cypress-tests/cypress/support/commands.js
@@ -1250,7 +1250,9 @@ Cypress.Commands.add(
"saveCardConfirmCallTest",
(saveCardConfirmBody, req_data, res_data, globalState) => {
const paymentIntentID = globalState.get("paymentID");
- saveCardConfirmBody.card_cvc = req_data.payment_method_data.card.card_cvc;
+ if (req_data.setup_future_usage === "on_session"){
+ saveCardConfirmBody.card_cvc = req_data.payment_method_data.card.card_cvc;
+ }
saveCardConfirmBody.payment_token = globalState.get("paymentToken");
saveCardConfirmBody.client_secret = globalState.get("clientSecret");
cy.request({