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

fix(cypress): expect Ilixium's error message text in the failing flows (#15307)

venkatakarthikm-maker66311dfd8c2c
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Ilixium.js b/cypress-tests/cypress/e2e/configs/Payment/Ilixium.js
index 15de844092..dc3d92c186 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Ilixium.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Ilixium.js
@@ -20,6 +20,15 @@ const threeDsCardDetails = {
card_cvc: "111",
};
+// Response body Ilixium returns for the declined-access flows, shared by every
+// failing flow below. The message is returned as `error_message` and the
+// reason code ("4") separately as `error_code`.
+const ACCESS_DENIED_RESPONSE_BODY = {
+ status: "failed",
+ error_message: "Access to this functionality has been denied",
+ error_code: "4",
+};
+
// Ilixium requires the customer's date of birth (schema-mandatory on
// accounts that enforce it; omitting it gets rejected with `VA8`). The
// connector reads it from the standard top-level `customer.date_of_birth`
@@ -105,11 +114,7 @@ export const connectorDetails = {
},
Response: {
status: 200,
- body: {
- status: "failed",
- error_message: "4",
- error_code: "4",
- },
+ body: ACCESS_DENIED_RESPONSE_BODY,
},
}),
No3DSAutoCapture: getCustomExchange({
@@ -126,11 +131,7 @@ export const connectorDetails = {
// Creds we currently have only supports manual capture. Therefore mapped error code for auto capture.
Response: {
status: 200,
- body: {
- status: "failed",
- error_message: "4",
- error_code: "4",
- },
+ body: ACCESS_DENIED_RESPONSE_BODY,
},
}),
PaymentConfirmWithShippingCost: getCustomExchange({
@@ -144,11 +145,7 @@ export const connectorDetails = {
},
Response: {
status: 200,
- body: {
- status: "failed",
- error_message: "4",
- error_code: "4",
- },
+ body: ACCESS_DENIED_RESPONSE_BODY,
},
}),
Capture: getCustomExchange({
@@ -200,11 +197,7 @@ export const connectorDetails = {
},
Response: {
status: 200,
- body: {
- status: "failed",
- error_message: "4",
- error_code: "4",
- },
+ body: ACCESS_DENIED_RESPONSE_BODY,
},
}),
SaveCardUseNo3DSAutoCapture: getCustomExchange({
@@ -219,11 +212,7 @@ export const connectorDetails = {
},
Response: {
status: 200,
- body: {
- status: "failed",
- error_message: "4",
- error_code: "4",
- },
+ body: ACCESS_DENIED_RESPONSE_BODY,
},
}),
SaveCardUseNo3DSAutoCaptureOffSession: getCustomExchange({
@@ -237,11 +226,7 @@ export const connectorDetails = {
},
Response: {
status: 200,
- body: {
- status: "failed",
- error_message: "4",
- error_code: "4",
- },
+ body: ACCESS_DENIED_RESPONSE_BODY,
},
}),
SaveCardUse3DSAutoCaptureOffSession: getCustomExchange({
@@ -255,11 +240,7 @@ export const connectorDetails = {
},
Response: {
status: 200,
- body: {
- status: "failed",
- error_message: "4",
- error_code: "4",
- },
+ body: ACCESS_DENIED_RESPONSE_BODY,
},
}),
SaveCardUseNo3DSManualCapture: getCustomExchange({
@@ -367,11 +348,7 @@ export const connectorDetails = {
},
Response: {
status: 200,
- body: {
- status: "failed",
- error_message: "4",
- error_code: "4",
- },
+ body: ACCESS_DENIED_RESPONSE_BODY,
},
}),
PaymentMethodIdMandateNo3DSManualCapture: getCustomExchange({
@@ -402,11 +379,7 @@ export const connectorDetails = {
},
Response: {
status: 200,
- body: {
- status: "failed",
- error_message: "4",
- error_code: "4",
- },
+ body: ACCESS_DENIED_RESPONSE_BODY,
},
}),
PaymentMethodIdMandate3DSManualCapture: getCustomExchange({
@@ -453,11 +426,7 @@ export const connectorDetails = {
},
Response: {
status: 200,
- body: {
- status: "failed",
- error_message: "4",
- error_code: "4",
- },
+ body: ACCESS_DENIED_RESPONSE_BODY,
},
},
AppliedOfferOnRetrieve: getCustomExchange({
@@ -477,11 +446,7 @@ export const connectorDetails = {
},
Response: {
status: 200,
- body: {
- status: "failed",
- error_message: "4",
- error_code: "4",
- },
+ body: ACCESS_DENIED_RESPONSE_BODY,
},
},
// The "save a card" step earlier in this scenario (card_pm.