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

test(cypress): add ConnectorMetadata testcases for noon, airwallex, braintree (#12079)

HS-QUALIBOT94bf523b6f77
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js b/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js
index 77a853e876..8faed0a007 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js
@@ -846,6 +846,46 @@ export const connectorDetails = {
},
},
},
+ ConnectorTestingData: {
+ Request: {
+ currency: "USD",
+ connector_metadata: {
+ airwallex: { payload: "test_payload_string" },
+ },
+ customer_acceptance: null,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ },
+ },
+ },
+ ConnectorTestingDataConfirm: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: {
+ card_number: "4111111111111111",
+ card_exp_month: "01",
+ card_exp_year: "2030",
+ card_cvc: "999",
+ card_holder_name: "joseph Doe",
+ },
+ },
+ connector_metadata: {
+ airwallex: { payload: "test_payload_string" },
+ },
+ customer_acceptance: null,
+ setup_future_usage: "on_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
},
bank_redirect_pm: {
Trustly: {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Braintree.js b/cypress-tests/cypress/e2e/configs/Payment/Braintree.js
index 1c5fdd807a..50b9b02637 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Braintree.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Braintree.js
@@ -602,5 +602,50 @@ export const connectorDetails = {
},
},
},
+ ConnectorTestingData: {
+ Request: {
+ currency: "USD",
+ connector_metadata: {
+ braintree: {
+ merchant_account_id: "juspay",
+ merchant_config_currency: "USD",
+ },
+ },
+ customer_acceptance: null,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ },
+ },
+ },
+ ConnectorTestingDataConfirm: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: {
+ card_number: "4242424242424242",
+ card_exp_month: "01",
+ card_exp_year: "2030",
+ card_cvc: "123",
+ card_holder_name: "joseph Doe",
+ },
+ },
+ connector_metadata: {
+ braintree: {
+ merchant_account_id: "juspay",
+ merchant_config_currency: "USD",
+ },
+ },
+ customer_acceptance: null,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
},
};
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Commons.js b/cypress-tests/cypress/e2e/configs/Payment/Commons.js
index e71864e5f1..83382588a2 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Commons.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Commons.js
@@ -2981,5 +2981,21 @@ export const connectorDetails = {
customer_acceptance: null,
},
}),
+ ConnectorTestingData: getCustomExchange({
+ Configs: { TRIGGER_SKIP: true },
+ Request: {},
+ Response: {
+ status: 200,
+ body: { status: "failed" },
+ },
+ }),
+ ConnectorTestingDataConfirm: getCustomExchange({
+ Configs: { TRIGGER_SKIP: true },
+ Request: {},
+ Response: {
+ status: 200,
+ body: { status: "failed" },
+ },
+ }),
},
};
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Noon.js b/cypress-tests/cypress/e2e/configs/Payment/Noon.js
index 6bd8894b87..c8b7a00c71 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Noon.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Noon.js
@@ -748,6 +748,48 @@ export const connectorDetails = {
},
},
},
+ ConnectorTestingData: {
+ Request: {
+ currency: "AED",
+ amount: 9000,
+ connector_metadata: {
+ noon: { order_category: "pay" },
+ },
+ customer_acceptance: null,
+ setup_future_usage: "on_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ },
+ },
+ },
+ ConnectorTestingDataConfirm: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: {
+ card_number: "4242424242424242",
+ card_exp_month: "01",
+ card_exp_year: "2030",
+ card_cvc: "123",
+ card_holder_name: "joseph Doe",
+ },
+ },
+ connector_metadata: {
+ noon: { order_category: "pay" },
+ },
+ customer_acceptance: null,
+ setup_future_usage: "on_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "failed",
+ },
+ },
+ },
},
webhook: {
TransactionIdConfig: {
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Utils.js b/cypress-tests/cypress/e2e/configs/Payment/Utils.js
index f26d525be2..503f4511d3 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Utils.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Utils.js
@@ -458,7 +458,7 @@ export const CONNECTOR_LISTS = {
// "stripe",
],
DDC_RACE_CONDITION: ["worldpay"],
- CONNECTOR_TESTING_DATA: ["adyen"],
+ CONNECTOR_TESTING_DATA: ["adyen", "noon", "airwallex", "braintree"],
// ucs connectors
UCS_CONNECTORS: ["authorizedotnet"],
OVERCAPTURE: ["adyen"],