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 testcases for unified error code and message (#6796)
Gnanasundari24b506bc18e465
diff --git a/cypress-tests/cypress/e2e/PaymentTest/00022-Variations.cy.js b/cypress-tests/cypress/e2e/PaymentTest/00022-Variations.cy.jsindex b3c220bc17..be594e7648 100644--- a/cypress-tests/cypress/e2e/PaymentTest/00022-Variations.cy.js+++ b/cypress-tests/cypress/e2e/PaymentTest/00022-Variations.cy.js@@ -673,4 +673,52 @@ describe("Corner cases", () => {);});});+ context("Card-NoThreeDS fail payment flow test", () => {+ let shouldContinue = true; // variable that will be used to skip tests if a previous test fails++ before("seed global state", () => {+ cy.task("getGlobalState").then((state) => {+ globalState = new State(state);+ });+ });++ after("flush global state", () => {+ cy.task("setGlobalState", globalState.data);+ });++ beforeEach(function () {+ if (!shouldContinue) {+ this.skip();+ }+ });++ it("create-payment-call-test", () => {+ const data = getConnectorDetails(globalState.get("connectorId"))[+ "card_pm"+ ]["PaymentIntent"];++ cy.createPaymentIntentTest(+ fixtures.createPaymentBody,+ data,+ "no_three_ds",+ "automatic",+ globalState+ );++ if (shouldContinue) shouldContinue = utils.should_continue_further(data);+ });++ it("Confirm No 3DS", () => {+ const data = getConnectorDetails(globalState.get("connectorId"))[+ "card_pm"+ ]["No3DSFailPayment"];++ cy.confirmCallTest(fixtures.confirmBody, data, true, globalState);+ if (shouldContinue) shouldContinue = utils.should_continue_further(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.jsindex 1fc4cf9649..4ac15ec28b 100644--- a/cypress-tests/cypress/e2e/PaymentUtils/Adyen.js+++ b/cypress-tests/cypress/e2e/PaymentUtils/Adyen.js@@ -16,6 +16,14 @@ const successfulThreeDSTestCardDetails = {card_cvc: "737",};+const failedNo3DSCardDetails = {+ card_number: "4242424242424242",+ card_exp_month: "01",+ card_exp_year: "25",+ card_holder_name: "joseph Doe",+ card_cvc: "123",+};+const singleUseMandateData = {customer_acceptance: {acceptance_type: "offline",@@ -182,6 +190,26 @@ export const connectorDetails = {},},},+ No3DSFailPayment: {+ Request: {+ payment_method: "card",+ payment_method_data: {+ card: failedNo3DSCardDetails,+ },+ customer_acceptance: null,+ setup_future_usage: "on_session",+ },+ Response: {+ status: 200,+ body: {+ status: "failed",+ error_code: "2",+ error_message: "Refused",+ unified_code: "UE_9000",+ unified_message: "Something went wrong",+ },+ },+ },Capture: {Request: {payment_method: "card",diff --git a/cypress-tests/cypress/e2e/PaymentUtils/Commons.js b/cypress-tests/cypress/e2e/PaymentUtils/Commons.jsindex 37649dfdf1..961762f2dd 100644--- a/cypress-tests/cypress/e2e/PaymentUtils/Commons.js+++ b/cypress-tests/cypress/e2e/PaymentUtils/Commons.js@@ -708,6 +708,20 @@ export const connectorDetails = {setup_future_usage: "on_session",},}),+ No3DSFailPayment: getCustomExchange({+ Request: {+ payment_method: "card",+ payment_method_data: {+ card: successfulNo3DSCardDetails,+ },+ customer_acceptance: null,+ setup_future_usage: "on_session",+ },+ Response: {+ status: 200,+ body: {},+ },+ }),Capture: getCustomExchange({Request: {payment_method: "card",diff --git a/cypress-tests/cypress/e2e/PaymentUtils/Stripe.js b/cypress-tests/cypress/e2e/PaymentUtils/Stripe.jsindex 4228a51153..fdc1926ae0 100644--- a/cypress-tests/cypress/e2e/PaymentUtils/Stripe.js+++ b/cypress-tests/cypress/e2e/PaymentUtils/Stripe.js@@ -16,6 +16,14 @@ const successfulThreeDSTestCardDetails = {card_cvc: "737",};+const failedNo3DSCardDetails = {+ card_number: "4000000000000002",+ card_exp_month: "01",+ card_exp_year: "25",+ card_holder_name: "joseph Doe",+ card_cvc: "123",+};+const singleUseMandateData = {customer_acceptance: {acceptance_type: "offline",@@ -254,6 +262,27 @@ export const connectorDetails = {},},},+ No3DSFailPayment: {+ Request: {+ payment_method: "card",+ payment_method_data: {+ card: failedNo3DSCardDetails,+ },+ customer_acceptance: null,+ setup_future_usage: "on_session",+ },+ Response: {+ status: 200,+ body: {+ status: "failed",+ error_code: "card_declined",+ error_message:+ "message - Your card was declined., decline_code - generic_decline",+ unified_code: "UE_9000",+ unified_message: "Something went wrong",+ },+ },+ },Capture: {Request: {payment_method: "card",