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): fix payload and airwallex tests (#11561)

AdityaWNL80e8d4e00657
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js b/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js
index a7a579e1b0..21dc165cd5 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js
@@ -515,6 +515,7 @@ export const connectorDetails = {
},
currency: "USD",
mandate_data: multiUseMandateData,
+ customer_acceptance: customerAcceptance,
},
Response: {
status: 200,
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Payload.js b/cypress-tests/cypress/e2e/configs/Payment/Payload.js
index 595d469302..e50a0200a1 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Payload.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Payload.js
@@ -20,14 +20,6 @@ const successfulThreeDSTestCardDetails = {
...successfulNo3DSCardDetails,
};
-const failedNo3DSCardDetails = {
- card_number: "4111111111119903",
- card_exp_month: "01",
- card_exp_year: "30",
- card_holder_name: "John Doe",
- card_cvc: "123",
-};
-
export const connectorDetails = {
card_pm: {
PaymentIntent: {
@@ -165,7 +157,7 @@ export const connectorDetails = {
Configs: {
DELAY: {
STATUS: true,
- TIMEOUT: DUPLICATION_TIMEOUT / 2, // 15 seconds
+ TIMEOUT: DUPLICATION_TIMEOUT,
},
},
Request: {
@@ -190,7 +182,7 @@ export const connectorDetails = {
Request: {
payment_method: "card",
payment_method_data: {
- card: failedNo3DSCardDetails,
+ card: successfulNo3DSCardDetails, //payload doesnt support failed cards
},
customer_acceptance: null,
setup_future_usage: "on_session",
@@ -198,11 +190,9 @@ export const connectorDetails = {
Response: {
status: 200,
body: {
- status: "failed",
- error_code: "card_declined",
- error_message: "Your card was declined",
- unified_code: "UE_9000",
- unified_message: "Something went wrong",
+ status: "succeeded",
+ payment_method: "card",
+ attempt_count: 1,
},
},
},
@@ -299,7 +289,7 @@ export const connectorDetails = {
Configs: {
DELAY: {
STATUS: true,
- TIMEOUT: DUPLICATION_TIMEOUT / 2, // 15 seconds
+ TIMEOUT: DUPLICATION_TIMEOUT,
},
},
Request: {
@@ -369,7 +359,7 @@ export const connectorDetails = {
Configs: {
DELAY: {
STATUS: true,
- TIMEOUT: DUPLICATION_TIMEOUT / 2, // 15 seconds
+ TIMEOUT: DUPLICATION_TIMEOUT,
},
},
Request: {
@@ -472,7 +462,7 @@ export const connectorDetails = {
Configs: {
DELAY: {
STATUS: true,
- TIMEOUT: DUPLICATION_TIMEOUT / 2, // 15 seconds
+ TIMEOUT: DUPLICATION_TIMEOUT,
},
},
Request: {
@@ -660,6 +650,7 @@ export const connectorDetails = {
},
currency: "USD",
mandate_data: singleUseMandateData,
+ customer_acceptance: customerAcceptance,
},
Response: {
status: 200,