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 fiuu, fiservemea , paybox and worldpay connector (#8209)

likhinbopannad7499c3f8730
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiservemea.js b/cypress-tests/cypress/e2e/configs/Payment/Fiservemea.js
index 6ae5f82d8a..da69ce1a83 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Fiservemea.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Fiservemea.js
@@ -8,6 +8,48 @@ const successfulNo3DSCardDetails = {
card_cvc: "002",
};
+const failedNo3DSCardDetails = {
+ card_number: "4000000000000069",
+ card_exp_month: "12",
+ card_exp_year: "30",
+ card_holder_name: "joseph Doe",
+ card_cvc: "123",
+};
+
+const billingAddress = {
+ address: {
+ state: "New York",
+ city: "New York",
+ country: "NL",
+ first_name: "john",
+ last_name: "doe",
+ zip: "10001",
+ line1: "123",
+ line2: "Main Street",
+ line3: "Apt 4B",
+ },
+};
+
+const singleUseMandateData = {
+ customer_acceptance: customerAcceptance,
+ mandate_type: {
+ single_use: {
+ amount: 8000,
+ currency: "EUR",
+ },
+ },
+};
+
+const multiUseMandateData = {
+ customer_acceptance: customerAcceptance,
+ mandate_type: {
+ multi_use: {
+ amount: 8000,
+ currency: "EUR",
+ },
+ },
+};
+
export const connectorDetails = {
card_pm: {
PaymentIntent: {
@@ -15,6 +57,23 @@ export const connectorDetails = {
currency: "EUR",
customer_acceptance: null,
setup_future_usage: "on_session",
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ },
+ },
+ },
+ PaymentIntentOffSession: {
+ Request: {
+ amount: 6000,
+ authentication_type: "no_three_ds",
+ currency: "EUR",
+ customer_acceptance: null,
+ setup_future_usage: "off_session",
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -32,6 +91,7 @@ export const connectorDetails = {
currency: "EUR",
customer_acceptance: null,
setup_future_usage: "on_session",
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -49,6 +109,49 @@ export const connectorDetails = {
currency: "EUR",
customer_acceptance: null,
setup_future_usage: "on_session",
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ "3DSManualCapture": {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "EUR",
+ customer_acceptance: null,
+ setup_future_usage: "on_session",
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ "3DSAutoCapture": {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "MYR",
+ customer_acceptance: null,
+ setup_future_usage: "on_session",
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -124,7 +227,41 @@ export const connectorDetails = {
},
},
},
+ manualPaymentRefund: {
+ Request: {
+ amount: 6000,
+ },
+ Response: {
+ status: 400,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ manualPaymentPartialRefund: {
+ Request: {
+ amount: 2000,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
ZeroAuthMandate: {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "EUR",
+ mandate_data: singleUseMandateData,
+ billing: billingAddress,
+ },
Response: {
status: 501,
body: {
@@ -145,6 +282,95 @@ export const connectorDetails = {
currency: "EUR",
setup_future_usage: "on_session",
customer_acceptance: customerAcceptance,
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ PaymentIntentWithShippingCost: {
+ Request: {
+ currency: "MYR",
+ shipping_cost: 50,
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ shipping_cost: 50,
+ amount: 6000,
+ },
+ },
+ },
+ PaymentConfirmWithShippingCost: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ customer_acceptance: null,
+ setup_future_usage: "on_session",
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "failed",
+ error_message: "No terminal setup",
+ },
+ },
+ },
+ MandateSingleUse3DSAutoCapture: {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "EUR",
+ mandate_data: singleUseMandateData,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ MandateSingleUse3DSManualCapture: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "EUR",
+ mandate_data: singleUseMandateData,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ MandateSingleUseNo3DSAutoCapture: {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "EUR",
+ mandate_data: singleUseMandateData,
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -153,6 +379,248 @@ export const connectorDetails = {
},
},
},
+ MandateSingleUseNo3DSManualCapture: {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "EUR",
+ mandate_data: singleUseMandateData,
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ MandateMultiUseNo3DSAutoCapture: {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "EUR",
+ mandate_data: multiUseMandateData,
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ MandateMultiUseNo3DSManualCapture: {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "EUR",
+ mandate_data: multiUseMandateData,
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ MandateMultiUse3DSAutoCapture: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "EUR",
+ mandate_data: multiUseMandateData,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ MandateMultiUse3DSManualCapture: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "EUR",
+ mandate_data: multiUseMandateData,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ MITAutoCapture: {
+ Request: {
+ currency: "EUR",
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ MITManualCapture: {
+ Request: {},
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ ZeroAuthPaymentIntent: {
+ Request: {
+ amount: 0,
+ setup_future_usage: "off_session",
+ currency: "EUR",
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ setup_future_usage: "off_session",
+ },
+ },
+ },
+ ZeroAuthConfirmPayment: {
+ Request: {
+ payment_type: "setup_mandate",
+ payment_method: "card",
+ payment_method_type: "credit",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ billing: billingAddress,
+ },
+ Response: {
+ status: 501,
+ body: {
+ error: {
+ type: "invalid_request",
+ message: "Setup Mandate flow for Fiservemea is not implemented",
+ code: "IR_00",
+ },
+ },
+ },
+ },
+ SaveCardUseNo3DSAutoCaptureOffSession: {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ payment_method: "card",
+ payment_method_type: "debit",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ setup_future_usage: "off_session",
+ customer_acceptance: customerAcceptance,
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ SaveCardUse3DSAutoCaptureOffSession: {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ payment_method: "card",
+ payment_method_type: "debit",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ setup_future_usage: "off_session",
+ customer_acceptance: customerAcceptance,
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_customer_action",
+ },
+ },
+ },
+ SaveCardUseNo3DSManualCaptureOffSession: {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "EUR",
+ setup_future_usage: "off_session",
+ customer_acceptance: customerAcceptance,
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ SaveCardConfirmAutoCaptureOffSession: {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ setup_future_usage: "off_session",
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ SaveCardConfirmManualCaptureOffSession: {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ setup_future_usage: "off_session",
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
SaveCardUseNo3DSManualCapture: {
Request: {
payment_method: "card",
@@ -162,6 +630,43 @@ export const connectorDetails = {
currency: "EUR",
setup_future_usage: "on_session",
customer_acceptance: customerAcceptance,
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ PaymentMethodIdMandateNo3DSAutoCapture: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "EUR",
+ mandate_data: null,
+ customer_acceptance: customerAcceptance,
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
+ PaymentMethodIdMandateNo3DSManualCapture: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "EUR",
+ mandate_data: null,
+ customer_acceptance: customerAcceptance,
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -170,5 +675,66 @@ export const connectorDetails = {
},
},
},
+ PaymentMethodIdMandate3DSAutoCapture: {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "EUR",
+ mandate_data: null,
+ authentication_type: "three_ds",
+ customer_acceptance: customerAcceptance,
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_customer_action",
+ },
+ },
+ },
+ PaymentMethodIdMandate3DSManualCapture: {
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ currency: "EUR",
+ mandate_data: null,
+ authentication_type: "three_ds",
+ customer_acceptance: customerAcceptance,
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_capture",
+ },
+ },
+ },
+ No3DSFailPayment: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: failedNo3DSCardDetails,
+ },
+ customer_acceptance: null,
+ setup_future_usage: "on_session",
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ },
+ },
+ },
},
};
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js
index dd64efb404..a0cfe09d13 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js
@@ -16,12 +16,20 @@ const successfulThreeDSTestCardDetails = {
card_cvc: "444",
};
+const failedNo3DSCardDetails = {
+ card_number: "4000000000000002",
+ card_exp_month: "01",
+ card_exp_year: "35",
+ card_holder_name: "joseph Doe",
+ card_cvc: "123",
+};
+
const singleUseMandateData = {
customer_acceptance: customerAcceptance,
mandate_type: {
single_use: {
amount: 8000,
- currency: "USD",
+ currency: "MYR",
},
},
};
@@ -31,17 +39,34 @@ const multiUseMandateData = {
mandate_type: {
multi_use: {
amount: 8000,
- currency: "USD",
+ currency: "MYR",
},
},
};
+
+const billingAddress = {
+ address: {
+ line1: "1467",
+ line2: "Harrison Street",
+ line3: "Harrison Street",
+ city: "San Fransico",
+ state: "California",
+ zip: "94122",
+ country: "MY",
+ first_name: "joseph",
+ last_name: "Doe",
+ },
+ email: "[email protected]",
+};
+
export const connectorDetails = {
card_pm: {
PaymentIntent: {
Request: {
- currency: "USD",
+ currency: "MYR",
customer_acceptance: null,
setup_future_usage: "on_session",
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -56,9 +81,10 @@ export const connectorDetails = {
payment_method_data: {
card: successfulThreeDSTestCardDetails,
},
- currency: "USD",
+ currency: "MYR",
customer_acceptance: null,
setup_future_usage: "on_session",
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -73,9 +99,10 @@ export const connectorDetails = {
payment_method_data: {
card: successfulThreeDSTestCardDetails,
},
- currency: "USD",
+ currency: "MYR",
customer_acceptance: null,
setup_future_usage: "on_session",
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -90,9 +117,10 @@ export const connectorDetails = {
payment_method_data: {
card: successfulNo3DSCardDetails,
},
- currency: "USD",
+ currency: "MYR",
customer_acceptance: null,
setup_future_usage: "on_session",
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -107,9 +135,10 @@ export const connectorDetails = {
payment_method_data: {
card: successfulNo3DSCardDetails,
},
- currency: "USD",
+ currency: "MYR",
customer_acceptance: null,
setup_future_usage: "on_session",
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -191,8 +220,9 @@ export const connectorDetails = {
payment_method_data: {
card: successfulThreeDSTestCardDetails,
},
- currency: "USD",
+ currency: "MYR",
mandate_data: singleUseMandateData,
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -207,8 +237,9 @@ export const connectorDetails = {
payment_method_data: {
card: successfulThreeDSTestCardDetails,
},
- currency: "USD",
+ currency: "MYR",
mandate_data: singleUseMandateData,
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -222,11 +253,9 @@ export const connectorDetails = {
payment_method: "card",
payment_method_data: {
card: successfulNo3DSCardDetails,
- billing: {
- email: "[email protected]",
- },
+ billing: billingAddress,
},
- currency: "USD",
+ currency: "MYR",
mandate_data: singleUseMandateData,
},
Response: {
@@ -241,11 +270,9 @@ export const connectorDetails = {
payment_method: "card",
payment_method_data: {
card: successfulNo3DSCardDetails,
- billing: {
- email: "[email protected]",
- },
+ billing: billingAddress,
},
- currency: "USD",
+ currency: "MYR",
mandate_data: singleUseMandateData,
},
Response: {
@@ -260,22 +287,9 @@ export const connectorDetails = {
payment_method: "card",
payment_method_data: {
card: successfulNo3DSCardDetails,
- billing: {
- address: {
- line1: "1467",
- line2: "Harrison Street",
- line3: "Harrison Street",
- city: "San Fransico",
- state: "California",
- zip: "94122",
- country: "NL",
- first_name: "joseph",
- last_name: "Doe",
- },
- email: "[email protected]",
- },
+ billing: billingAddress,
},
- currency: "USD",
+ currency: "MYR",
mandate_data: multiUseMandateData,
},
Response: {
@@ -290,11 +304,9 @@ export const connectorDetails = {
payment_method: "card",
payment_method_data: {
card: successfulNo3DSCardDetails,
- billing: {
- email: "[email protected]",
- },
+ billing: billingAddress,
},
- currency: "USD",
+ currency: "MYR",
mandate_data: multiUseMandateData,
},
Response: {
@@ -310,8 +322,9 @@ export const connectorDetails = {
payment_method_data: {
card: successfulThreeDSTestCardDetails,
},
- currency: "USD",
+ currency: "MYR",
mandate_data: multiUseMandateData,
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -326,8 +339,9 @@ export const connectorDetails = {
payment_method_data: {
card: successfulThreeDSTestCardDetails,
},
- currency: "USD",
+ currency: "MYR",
mandate_data: multiUseMandateData,
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -337,13 +351,21 @@ export const connectorDetails = {
},
},
MITAutoCapture: {
- Request: {},
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
+ Request: {
+ currency: "MYR",
+ billing: billingAddress,
+ },
Response: {
status: 200,
body: {
status: "failed",
- error_code: "The currency not allow for the RecordType",
- error_message: "The currency not allow for the RecordType",
+ error_code:
+ "Your transaction has been denied due to merchant account issue",
+ error_message:
+ "Your transaction has been denied due to merchant account issue",
},
},
},
@@ -366,8 +388,10 @@ export const connectorDetails = {
status: 200,
body: {
status: "failed",
- error_code: "The currency not allow for the RecordType",
- error_message: "The currency not allow for the RecordType",
+ error_code:
+ "Your transaction has been denied due to merchant account issue",
+ error_message:
+ "Your transaction has been denied due to merchant account issue",
},
},
},
@@ -375,9 +399,10 @@ export const connectorDetails = {
Request: {
amount: 6000,
authentication_type: "no_three_ds",
- currency: "USD",
+ currency: "MYR",
customer_acceptance: null,
setup_future_usage: "off_session",
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -391,24 +416,12 @@ export const connectorDetails = {
payment_method: "card",
payment_method_data: {
card: successfulNo3DSCardDetails,
- billing: {
- address: {
- line1: "1467",
- line2: "Harrison Street",
- line3: "Harrison Street",
- city: "San Fransico",
- state: "California",
- zip: "94122",
- country: "NL",
- first_name: "joseph",
- last_name: "Doe",
- },
- email: "[email protected]",
- },
+ billing: billingAddress,
},
- currency: "USD",
+ currency: "MYR",
mandate_data: null,
customer_acceptance: customerAcceptance,
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -422,24 +435,11 @@ export const connectorDetails = {
payment_method: "card",
payment_method_data: {
card: successfulNo3DSCardDetails,
- billing: {
- address: {
- line1: "1467",
- line2: "Harrison Street",
- line3: "Harrison Street",
- city: "San Fransico",
- state: "California",
- zip: "94122",
- country: "NL",
- first_name: "joseph",
- last_name: "Doe",
- },
- email: "[email protected]",
- },
},
- currency: "USD",
+ currency: "MYR",
setup_future_usage: "on_session",
customer_acceptance: customerAcceptance,
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -453,24 +453,12 @@ export const connectorDetails = {
payment_method: "card",
payment_method_data: {
card: successfulNo3DSCardDetails,
- billing: {
- address: {
- line1: "1467",
- line2: "Harrison Street",
- line3: "Harrison Street",
- city: "San Fransico",
- state: "California",
- zip: "94122",
- country: "NL",
- first_name: "joseph",
- last_name: "Doe",
- },
- email: "[email protected]",
- },
+ billing: billingAddress,
},
- currency: "USD",
+ currency: "MYR",
setup_future_usage: "on_session",
customer_acceptance: customerAcceptance,
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -484,23 +472,12 @@ export const connectorDetails = {
payment_method: "card",
payment_method_data: {
card: successfulNo3DSCardDetails,
- billing: {
- address: {
- line1: "1467",
- line2: "Harrison Street",
- line3: "Harrison Street",
- city: "San Fransico",
- state: "California",
- zip: "94122",
- country: "NL",
- first_name: "joseph",
- last_name: "Doe",
- },
- email: "[email protected]",
- },
+ billing: billingAddress,
},
+ currency: "MYR",
setup_future_usage: "off_session",
customer_acceptance: customerAcceptance,
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -514,21 +491,9 @@ export const connectorDetails = {
payment_method: "card",
payment_method_data: {
card: successfulThreeDSTestCardDetails,
- billing: {
- address: {
- line1: "1467",
- line2: "Harrison Street",
- line3: "Harrison Street",
- city: "San Fransico",
- state: "California",
- zip: "94122",
- country: "NL",
- first_name: "joseph",
- last_name: "Doe",
- },
- email: "[email protected]",
- },
+ billing: billingAddress,
},
+ currency: "MYR",
setup_future_usage: "off_session",
customer_acceptance: customerAcceptance,
},
@@ -544,20 +509,7 @@ export const connectorDetails = {
payment_method: "card",
payment_method_data: {
card: successfulNo3DSCardDetails,
- billing: {
- address: {
- line1: "1467",
- line2: "Harrison Street",
- line3: "Harrison Street",
- city: "San Fransico",
- state: "California",
- zip: "94122",
- country: "NL",
- first_name: "joseph",
- last_name: "Doe",
- },
- email: "[email protected]",
- },
+ billing: billingAddress,
},
setup_future_usage: "off_session",
customer_acceptance: customerAcceptance,
@@ -572,24 +524,32 @@ export const connectorDetails = {
SaveCardConfirmAutoCaptureOffSession: {
Request: {
setup_future_usage: "off_session",
+ billing: billingAddress,
},
Response: {
status: 200,
body: {
status: "failed",
- error_message: "The currency not allow for the RecordType",
+ error_code:
+ "Your transaction has been denied due to merchant account issue",
+ error_message:
+ "Your transaction has been denied due to merchant account issue",
},
},
},
SaveCardConfirmManualCaptureOffSession: {
Request: {
setup_future_usage: "off_session",
+ billing: billingAddress,
},
Response: {
status: 200,
body: {
status: "failed",
- error_message: "The currency not allow for the RecordType",
+ error_code:
+ "Your transaction has been denied due to merchant account issue",
+ error_message:
+ "Your transaction has been denied due to merchant account issue",
},
},
},
@@ -598,24 +558,12 @@ export const connectorDetails = {
payment_method: "card",
payment_method_data: {
card: successfulNo3DSCardDetails,
- billing: {
- address: {
- line1: "1467",
- line2: "Harrison Street",
- line3: "Harrison Street",
- city: "San Fransico",
- state: "California",
- zip: "94122",
- country: "NL",
- first_name: "joseph",
- last_name: "Doe",
- },
- email: "[email protected]",
- },
+ billing: billingAddress,
},
- currency: "USD",
+ currency: "MYR",
mandate_data: null,
customer_acceptance: customerAcceptance,
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -629,25 +577,13 @@ export const connectorDetails = {
payment_method: "card",
payment_method_data: {
card: successfulThreeDSTestCardDetails,
- billing: {
- address: {
- line1: "1467",
- line2: "Harrison Street",
- line3: "Harrison Street",
- city: "San Fransico",
- state: "California",
- zip: "94122",
- country: "NL",
- first_name: "joseph",
- last_name: "Doe",
- },
- email: "[email protected]",
- },
+ billing: billingAddress,
},
- currency: "USD",
+ currency: "MYR",
mandate_data: null,
authentication_type: "three_ds",
customer_acceptance: customerAcceptance,
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -661,24 +597,13 @@ export const connectorDetails = {
payment_method: "card",
payment_method_data: {
card: successfulThreeDSTestCardDetails,
- billing: {
- address: {
- line1: "1467",
- line2: "Harrison Street",
- line3: "Harrison Street",
- city: "San Fransico",
- state: "California",
- zip: "94122",
- country: "NL",
- first_name: "joseph",
- last_name: "Doe",
- },
- email: "[email protected]",
- },
+ billing: billingAddress,
},
+ currency: "MYR",
mandate_data: null,
authentication_type: "three_ds",
customer_acceptance: customerAcceptance,
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -688,6 +613,15 @@ export const connectorDetails = {
},
},
PaymentConfirmWithShippingCost: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ customer_acceptance: null,
+ setup_future_usage: "on_session",
+ billing: billingAddress,
+ },
Response: {
status: 200,
body: {
@@ -705,8 +639,9 @@ export const connectorDetails = {
payment_method_data: {
card: successfulNo3DSCardDetails,
},
- currency: "USD",
+ currency: "MYR",
mandate_data: singleUseMandateData,
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -724,7 +659,10 @@ export const connectorDetails = {
status: 200,
body: {
status: "failed",
- error_message: "The currency not allow for the RecordType",
+ error_code:
+ "Your transaction has been denied due to merchant account issue",
+ error_message:
+ "Your transaction has been denied due to merchant account issue",
},
},
},
@@ -732,7 +670,7 @@ export const connectorDetails = {
Request: {
amount: 0,
setup_future_usage: "off_session",
- currency: "USD",
+ currency: "MYR",
},
Response: {
status: 200,
@@ -750,6 +688,7 @@ export const connectorDetails = {
payment_method_data: {
card: successfulNo3DSCardDetails,
},
+ billing: billingAddress,
},
Response: {
status: 200,
@@ -759,5 +698,131 @@ export const connectorDetails = {
},
},
},
+ PaymentIntentWithShippingCost: {
+ Request: {
+ currency: "MYR",
+ shipping_cost: 50,
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ shipping_cost: 50,
+ amount: 6000,
+ },
+ },
+ },
+ No3DSFailPayment: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: failedNo3DSCardDetails,
+ },
+ customer_acceptance: null,
+ setup_future_usage: "on_session",
+ billing: billingAddress,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "failed",
+ error_code: "05",
+ error_message: "Do not honor",
+ unified_code: "UE_9000",
+ unified_message: "Something went wrong",
+ },
+ },
+ },
+ PaymentWithoutBilling: {
+ Request: {
+ currency: "MYR",
+ customer_acceptance: null,
+ setup_future_usage: "on_session",
+ authentication_type: "no_three_ds",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ },
+ },
+ },
+ PaymentWithBilling: {
+ Request: {
+ currency: "MYR",
+ setup_future_usage: "on_session",
+ billing: {
+ address: {
+ line1: "1467",
+ line2: "CA",
+ line3: "Harrison Street",
+ city: "San Fransico",
+ state: "CA",
+ zip: "94122",
+ country: "MY",
+ first_name: "joseph",
+ last_name: "Doe",
+ },
+ phone: {
+ number: "9111222333",
+ country_code: "+91",
+ },
+ },
+ email: "[email protected]",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ },
+ },
+ },
+ PaymentWithFullName: {
+ Request: {
+ currency: "MYR",
+ setup_future_usage: "on_session",
+ billing: {
+ address: {
+ first_name: "joseph",
+ last_name: "Doe",
+ },
+ phone: {
+ number: "9111222333",
+ country_code: "+91",
+ },
+ },
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ },
+ },
+ },
+ PaymentWithBillingEmail: {
+ Request: {
+ currency: "MYR",
+ setup_future_usage: "on_session",
+ email: "[email protected]",
+ billing: {
+ address: {
+ first_name: "joseph",
+ last_name: "Doe",
+ },
+ phone: {
+ number: "9111222333",
+ country_code: "+91",
+ },
+ email: "[email protected]",
+ },
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ },
+ },
+ },
},
};
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Paybox.js b/cypress-tests/cypress/e2e/configs/Payment/Paybox.js
index 54dcb5cbeb..153e165db4 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Paybox.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Paybox.js
@@ -51,6 +51,25 @@ const captureNotSupported = {
"Capture Not allowed in case of Creating the Subscriber is not supported by Paybox",
};
+const billingData = {
+ address: {
+ line1: "1467",
+ line2: "Harrison Street\nApt 101",
+ line3: "Harrison Street\nApt 101",
+ city: "Paris",
+ state: "asd",
+ zip: "8008",
+ country: "FR",
+ first_name: "joseph",
+ last_name: "Doe",
+ },
+ phone: {
+ number: "9123456789",
+ country_code: "+91",
+ },
+ email: "[email protected]",
+};
+
export const connectorDetails = {
card_pm: {
PaymentIntent: {
@@ -58,6 +77,7 @@ export const connectorDetails = {
currency: "EUR",
customer_acceptance: null,
setup_future_usage: "on_session",
+ billing: billingData,
},
Response: {
status: 200,
@@ -73,6 +93,7 @@ export const connectorDetails = {
authentication_type: "no_three_ds",
customer_acceptance: null,
setup_future_usage: "off_session",
+ billing: billingData,
},
Response: {
status: 200,
@@ -91,6 +112,7 @@ export const connectorDetails = {
},
customer_acceptance: null,
setup_future_usage: "on_session",
+ billing: billingData,
},
Response: {
status: 200,
@@ -109,6 +131,7 @@ export const connectorDetails = {
},
customer_acceptance: null,
setup_future_usage: "on_session",
+ billing: billingData,
},
Response: {
status: 200,
@@ -126,6 +149,7 @@ export const connectorDetails = {
currency: "EUR",
customer_acceptance: null,
setup_future_usage: "on_session",
+ billing: billingData,
},
Response: {
status: 200,
@@ -144,6 +168,7 @@ export const connectorDetails = {
currency: "EUR",
customer_acceptance: null,
setup_future_usage: "on_session",
+ billing: billingData,
},
Response: {
status: 200,
@@ -225,6 +250,41 @@ export const connectorDetails = {
},
},
},
+ PaymentIntentWithShippingCost: {
+ Request: {
+ currency: "EUR",
+ shipping_cost: 50,
+ billing: billingData,
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "requires_payment_method",
+ shipping_cost: 50,
+ amount: 6000,
+ },
+ },
+ },
+ PaymentConfirmWithShippingCost: {
+ Request: {
+ payment_method: "card",
+ payment_method_data: {
+ card: successfulNo3DSCardDetails,
+ },
+ customer_acceptance: null,
+ setup_future_usage: "on_session",
+ },
+ Response: {
+ status: 200,
+ body: {
+ status: "succeeded",
+ shipping_cost: 50,
+ amount_received: 6050,
+ amount: 6000,
+ net_amount: 6050,
+ },
+ },
+ },
MandateSingleUse3DSAutoCapture: {
Request: {
payment_method: "card",
@@ -233,6 +293,7 @@ export const connectorDetails = {
},
currency: "EUR",
mandate_data: singleUseMandateData,
+ billing: billingData,
},
Response: {
status: 400,
@@ -249,6 +310,7 @@ export const connectorDetails = {
},
currency: "EUR",
mandate_data: singleUseMandateData,
+ billing: billingData,
},
Response: {
status: 200,
@@ -265,6 +327,7 @@ export const connectorDetails = {
},
currency: "EUR",
mandate_data: singleUseMandateData,
+ billing: billingData,
},
Response: {
status: 400,
@@ -281,6 +344,7 @@ export const connectorDetails = {
},
currency: "EUR",
mandate_data: singleUseMandateData,
+ billing: billingData,
},
Response: {
status: 200,
@@ -297,6 +361,7 @@ export const connectorDetails = {
},
currency: "EUR",
mandate_data: multiUseMandateData,
+ billing: billingData,
},
Response: {
status: 200,
@@ -313,6 +378,7 @@ export const connectorDetails = {
},
currency: "EUR",
mandate_data: multiUseMandateData,
+ billing: billingData,
},
Response: {
status: 200,
@@ -329,6 +395,7 @@ export const connectorDetails = {
},
currency: "EUR",
mandate_data: multiUseMandateData,
+ billing: billingData,
},
Response: {
status: 400,
@@ -345,6 +412,7 @@ export const connectorDetails = {
},
currency: "EUR",
mandate_data: multiUseMandateData,
+ billing: billingData,
},
Response: {
status: 200,
@@ -357,6 +425,7 @@ export const connectorDetails = {
Request: {
currency: "EUR",
amount: 6000,
+ billing: billingData,
},
Response: {
status: 200,
@@ -385,6 +454,7 @@ export const connectorDetails = {
currency: "EUR",
mandate_data: null,
customer_acceptance: customerAcceptance,
+ billing: billingData,
},
Response: {
status: 400,
@@ -402,6 +472,7 @@ export const connectorDetails = {
currency: "EUR",
mandate_data: null,
customer_acceptance: customerAcceptance,
+ billing: billingData,
},
Response: {
status: 200,
@@ -420,6 +491,7 @@ export const connectorDetails = {
mandate_data: null,
authentication_type: "three_ds",
customer_acceptance: customerAcceptance,
+ billing: billingData,
},
Response: {
status: 400,
@@ -437,6 +509,7 @@ export const connectorDetails = {
mandate_data: null,
authentication_type: "three_ds",
customer_acceptance: customerAcceptance,
+ billing: billingData,
},
Response: {
status: 200,
@@ -453,6 +526,7 @@ export const connectorDetails = {
},
currency: "EUR",
mandate_data: singleUseMandateData,
+ billing: billingData,
},
Response: {
status: 200,
@@ -466,6 +540,7 @@ export const connectorDetails = {
amount: 0,
setup_future_usage: "off_session",
currency: "EUR",
+ billing: billingData,
},
Response: {
status: 200,
@@ -483,6 +558,7 @@ export const connectorDetails = {
payment_method_data: {
card: successfulNo3DSCardDetails,
},
+ billing: billingData,
},
Response: {
status: 200,
@@ -501,6 +577,7 @@ export const connectorDetails = {
currency: "EUR",
setup_future_usage: "on_session",
customer_acceptance: customerAcceptance,
+ billing: billingData,
},
Response: {
status: 200,
@@ -518,6 +595,7 @@ export const connectorDetails = {
},
setup_future_usage: "off_session",
customer_acceptance: customerAcceptance,
+ billing: billingData,
},
Response: {
status: 400,
@@ -535,6 +613,7 @@ export const connectorDetails = {
},
setup_future_usage: "off_session",
customer_acceptance: customerAcceptance,
+ billing: billingData,
},
Response: {
status: 400,
@@ -550,8 +629,10 @@ export const connectorDetails = {
payment_method_data: {
card: successfulNo3DSCardDetails,
},
+ currency: "EUR",
setup_future_usage: "off_session",
customer_acceptance: customerAcceptance,
+ billing: billingData,
},
Response: {
status: 200,
@@ -574,6 +655,7 @@ export const connectorDetails = {
SaveCardConfirmManualCaptureOffSession: {
Request: {
setup_future_usage: "off_session",
+ billing: billingData,
},
Response: {
status: 200,
@@ -591,6 +673,7 @@ export const connectorDetails = {
currency: "EUR",
setup_future_usage: "on_session",
customer_acceptance: customerAcceptance,
+ billing: billingData,
},
Response: {
status: 200,
@@ -599,310 +682,95 @@ export const connectorDetails = {
},
},
},
- InvalidCardNumber: {
- Request: {
- currency: "EUR",
- payment_method: "card",
- payment_method_type: "debit",
- setup_future_usage: "on_session",
- payment_method_data: {
- card: {
- card_number: "123456",
- card_exp_month: "10",
- card_exp_year: "50",
- card_holder_name: "joseph Doe",
- card_cvc: "123",
- },
- },
- },
- Response: {
- status: 400,
- body: {
- error: {
- error_type: "invalid_request",
- message: "Json deserialize error: invalid card number length",
- code: "IR_06",
- },
- },
- },
- },
- InvalidExpiryMonth: {
- Request: {
- currency: "EUR",
- payment_method: "card",
- payment_method_type: "debit",
- setup_future_usage: "on_session",
- payment_method_data: {
- card: {
- card_number: "4242424242424242",
- card_exp_month: "00",
- card_exp_year: "2023",
- card_holder_name: "joseph Doe",
- card_cvc: "123",
- },
- },
- },
- Response: {
- status: 400,
- body: {
- error: {
- type: "invalid_request",
- message: "Invalid Expiry Month",
- code: "IR_16",
- },
- },
- },
- },
- InvalidExpiryYear: {
+ No3DSFailPayment: {
Request: {
- currency: "EUR",
payment_method: "card",
- payment_method_type: "debit",
- setup_future_usage: "on_session",
payment_method_data: {
- card: {
- card_number: "4242424242424242",
- card_exp_month: "01",
- card_exp_year: "2023",
- card_holder_name: "joseph Doe",
- card_cvc: "123",
- },
- },
- },
- Response: {
- status: 400,
- body: {
- error: {
- type: "invalid_request",
- message: "Invalid Expiry Year",
- code: "IR_16",
- },
+ card: successfulNo3DSCardDetails,
},
- },
- },
- InvalidCardCvv: {
- Request: {
currency: "EUR",
- payment_method: "card",
- payment_method_type: "debit",
+ customer_acceptance: null,
setup_future_usage: "on_session",
- payment_method_data: {
- card: {
- card_number: "4242424242424242",
- card_exp_month: "01",
- card_exp_year: "2023",
- card_holder_name: "joseph Doe",
- card_cvc: "123456",
- },
- },
+ billing: billingData,
},
Response: {
- status: 400,
+ status: 200,
body: {
- error: {
- type: "invalid_request",
- message: "Invalid card_cvc length",
- code: "IR_16",
- },
+ status: "succeeded",
},
},
},
- InvalidCurrency: {
+ PaymentWithoutBilling: {
Request: {
- currency: "United",
- payment_method: "card",
- payment_method_type: "debit",
+ currency: "USD",
+ customer_acceptance: null,
setup_future_usage: "on_session",
- payment_method_data: {
- card: {
- card_number: "4242424242424242",
- card_exp_month: "01",
- card_exp_year: "2023",
- card_holder_name: "joseph Doe",
- card_cvc: "123456",
- },
- },
+ authentication_type: "no_three_ds",
},
Response: {
- status: 400,
+ status: 200,
body: {
- error: {
- error_type: "invalid_request",
- message:
- "Json deserialize error: unknown variant `United`, expected one of `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HRK`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`, `ZWL`",
- code: "IR_06",
- },
+ status: "requires_payment_method",
},
},
},
- InvalidCaptureMethod: {
+ PaymentWithBilling: {
Request: {
- currency: "EUR",
- capture_method: "auto",
- payment_method: "card",
- payment_method_type: "debit",
+ currency: "USD",
setup_future_usage: "on_session",
- payment_method_data: {
- card: {
- card_number: "4242424242424242",
- card_exp_month: "01",
- card_exp_year: "2023",
- card_holder_name: "joseph Doe",
- card_cvc: "123456",
- },
- },
+ billing: billingData,
+ email: "[email protected]",
},
Response: {
- status: 400,
+ status: 200,
body: {
- error: {
- error_type: "invalid_request",
- message:
- "Json deserialize error: unknown variant `auto`, expected one of `automatic`, `manual`, `manual_multiple`, `scheduled`",
- code: "IR_06",
- },
+ status: "requires_payment_method",
},
},
},
- InvalidPaymentMethod: {
+ PaymentWithFullName: {
Request: {
- currency: "EUR",
- payment_method: "this_supposed_to_be_a_card",
- payment_method_type: "debit",
+ currency: "USD",
setup_future_usage: "on_session",
- payment_method_data: {
- card: {
- card_number: "4242424242424242",
- card_exp_month: "01",
- card_exp_year: "2023",
- card_holder_name: "joseph Doe",
- card_cvc: "123456",
- },
- },
- },
- Response: {
- status: 400,
- body: {
- error: {
- error_type: "invalid_request",
- message:
- "Json deserialize error: unknown variant `this_supposed_to_be_a_card`, expected one of `card`, `card_redirect`, `pay_later`, `wallet`, `bank_redirect`, `bank_transfer`, `crypto`, `bank_debit`, `reward`, `real_time_payment`, `upi`, `voucher`, `gift_card`, `open_banking`, `mobile_payment`",
- code: "IR_06",
+ billing: {
+ address: {
+ first_name: "joseph",
+ last_name: "Doe",
},
- },
- },
- },
- InvalidAmountToCapture: {
- Request: {
- currency: "EUR",
- amount_to_capture: 10000,
- payment_method: "card",
- payment_method_type: "debit",
- setup_future_usage: "on_session",
- payment_method_data: {
- card: {
- card_number: "4242424242424242",
- card_exp_month: "01",
- card_exp_year: "2026",
- card_holder_name: "joseph Doe",
- card_cvc: "123",
+ phone: {
+ number: "9111222333",
+ country_code: "+91",
},
},
},
Response: {
- status: 400,
+ status: 200,
body: {
- error: {
- type: "invalid_request",
- message:
- "amount_to_capture contains invalid data. Expected format is amount_to_capture lesser than amount",
- code: "IR_05",
- },
+ status: "requires_payment_method",
},
},
},
- MissingRequiredParam: {
+ PaymentWithBillingEmail: {
Request: {
- currency: "EUR",
- payment_method_type: "debit",
+ currency: "USD",
setup_future_usage: "on_session",
- payment_method_data: {
- card: {
- card_number: "4242424242424242",
- card_exp_month: "01",
- card_exp_year: "2026",
- card_holder_name: "joseph Doe",
- card_cvc: "123",
- },
- },
- },
- Response: {
- status: 400,
- body: {
- error: {
- type: "invalid_request",
- message: "Missing required param: payment_method",
- code: "IR_04",
- },
- },
- },
- },
- PaymentIntentErrored: {
- Request: {
- currency: "EUR",
- },
- Response: {
- status: 422,
- body: {
- error: {
- type: "invalid_request",
- message:
- "A payment token or payment method data or ctp service details is required",
- code: "IR_06",
- },
- },
- },
- },
- CaptureGreaterAmount: {
- Request: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
+ email: "[email protected]",
+ billing: {
+ address: {
+ first_name: "joseph",
+ last_name: "Doe",
},
- currency: "EUR",
- customer_acceptance: null,
- },
- },
- Response: {
- status: 400,
- body: {
- error: {
- type: "invalid_request",
- message: "amount_to_capture is greater than amount",
- code: "IR_06",
+ phone: {
+ number: "9111222333",
+ country_code: "+91",
},
+ email: "[email protected]",
},
},
- },
- ConfirmSuccessfulPayment: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "EUR",
- customer_acceptance: null,
- },
Response: {
- status: 400,
+ status: 200,
body: {
- error: {
- type: "invalid_request",
- message:
- "You cannot confirm this payment because it has status succeeded",
- code: "IR_16",
- },
+ status: "requires_payment_method",
},
},
},
diff --git a/cypress-tests/cypress/e2e/configs/Payment/WorldPay.js b/cypress-tests/cypress/e2e/configs/Payment/WorldPay.js
index 64d447416d..098c46dae3 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/WorldPay.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/WorldPay.js
@@ -599,9 +599,9 @@ export const connectorDetails = {
trigger_skip: true,
status: 200,
body: {
- error_code: "internalErrorOccurred",
+ error_code: "boardingError",
error_message:
- "We cannot currently process your request. Please contact support.",
+ "There has been a problem with your boarding and you cannot use this API yet, please contact support.",
status: "failed",
payment_method_id: null,
},
@@ -631,12 +631,11 @@ export const connectorDetails = {
mandate_data: singleUseMandateData,
},
Response: {
- trigger_skip: true,
status: 200,
body: {
- error_code: "internalErrorOccurred",
+ error_code: "boardingError",
error_message:
- "We cannot currently process your request. Please contact support.",
+ "There has been a problem with your boarding and you cannot use this API yet, please contact support.",
status: "failed",
payment_method_id: null,
},
@@ -723,16 +722,11 @@ export const connectorDetails = {
payment_method_type: "credit",
card_networks: [{ eligible_connectors: ["worldpay"] }],
required_fields: {
- "payment_method_data.card.card_number": {
- required_field: "payment_method_data.card.card_number",
- display_name: "card_number",
- field_type: "user_card_number",
- value: null,
- },
- "payment_method_data.card.card_exp_month": {
- required_field: "payment_method_data.card.card_exp_month",
- display_name: "card_exp_month",
- field_type: "user_card_expiry_month",
+ "billing.address.first_name": {
+ required_field:
+ "payment_method_data.billing.address.first_name",
+ display_name: "card_holder_name",
+ field_type: "user_full_name",
value: null,
},
"payment_method_data.card.card_exp_year": {
@@ -741,168 +735,16 @@ export const connectorDetails = {
field_type: "user_card_expiry_year",
value: null,
},
- "billing.address.line1": {
- required_field: "payment_method_data.billing.address.line1",
- display_name: "line1",
- field_type: "user_address_line1",
- value: null,
- },
- "billing.address.country": {
- required_field:
- "payment_method_data.billing.address.country",
- display_name: "country",
- field_type: {
- user_address_country: {
- options: [
- "AF",
- "AU",
- "AW",
- "AZ",
- "BS",
- "BH",
- "BD",
- "BB",
- "BZ",
- "BM",
- "BT",
- "BO",
- "BA",
- "BW",
- "BR",
- "BN",
- "BG",
- "BI",
- "KH",
- "CA",
- "CV",
- "KY",
- "CL",
- "CO",
- "KM",
- "CD",
- "CR",
- "CZ",
- "DZ",
- "DK",
- "DJ",
- "ST",
- "DO",
- "EC",
- "EG",
- "SV",
- "ER",
- "ET",
- "FK",
- "FJ",
- "GM",
- "GE",
- "GH",
- "GI",
- "GT",
- "GN",
- "GY",
- "HT",
- "HN",
- "HK",
- "HU",
- "IS",
- "IN",
- "ID",
- "IR",
- "IQ",
- "IE",
- "IL",
- "IT",
- "JM",
- "JP",
- "JO",
- "KZ",
- "KE",
- "KW",
- "LA",
- "LB",
- "LS",
- "LR",
- "LY",
- "LT",
- "MO",
- "MK",
- "MG",
- "MW",
- "MY",
- "MV",
- "MR",
- "MU",
- "MX",
- "MD",
- "MN",
- "MA",
- "MZ",
- "MM",
- "NA",
- "NZ",
- "NI",
- "NG",
- "KP",
- "NO",
- "AR",
- "PK",
- "PG",
- "PY",
- "PE",
- "UY",
- "PH",
- "PL",
- "GB",
- "QA",
- "OM",
- "RO",
- "RU",
- "RW",
- "WS",
- "SG",
- "ST",
- "ZA",
- "KR",
- "LK",
- "SH",
- "SD",
- "SR",
- "SZ",
- "SE",
- "CH",
- "SY",
- "TW",
- "TJ",
- "TZ",
- "TH",
- "TT",
- "TN",
- "TR",
- "UG",
- "UA",
- "US",
- "UZ",
- "VU",
- "VE",
- "VN",
- "ZM",
- "ZW",
- ],
- },
- },
- value: null,
- },
- "billing.address.city": {
- required_field: "payment_method_data.billing.address.city",
- display_name: "city",
- field_type: "user_address_city",
+ "payment_method_data.card.card_number": {
+ required_field: "payment_method_data.card.card_number",
+ display_name: "card_number",
+ field_type: "user_card_number",
value: null,
},
- "billing.address.zip": {
- required_field: "payment_method_data.billing.address.zip",
- display_name: "zip",
- field_type: "user_address_pincode",
+ "payment_method_data.card.card_exp_month": {
+ required_field: "payment_method_data.card.card_exp_month",
+ display_name: "card_exp_month",
+ field_type: "user_card_expiry_month",
value: null,
},
},
@@ -926,6 +768,13 @@ export const connectorDetails = {
field_type: "user_card_number",
value: null,
},
+ "billing.address.first_name": {
+ required_field:
+ "payment_method_data.billing.address.first_name",
+ display_name: "card_holder_name",
+ field_type: "user_full_name",
+ value: "joseph",
+ },
"payment_method_data.card.card_exp_month": {
required_field: "payment_method_data.card.card_exp_month",
display_name: "card_exp_month",
@@ -938,170 +787,6 @@ export const connectorDetails = {
field_type: "user_card_expiry_year",
value: null,
},
- "billing.address.line1": {
- required_field: "payment_method_data.billing.address.line1",
- display_name: "line1",
- field_type: "user_address_line1",
- value: "1467",
- },
- "billing.address.country": {
- required_field:
- "payment_method_data.billing.address.country",
- display_name: "country",
- field_type: {
- user_address_country: {
- options: [
- "AF",
- "AU",
- "AW",
- "AZ",
- "BS",
- "BH",
- "BD",
- "BB",
- "BZ",
- "BM",
- "BT",
- "BO",
- "BA",
- "BW",
- "BR",
- "BN",
- "BG",
- "BI",
- "KH",
- "CA",
- "CV",
- "KY",
- "CL",
- "CO",
- "KM",
- "CD",
- "CR",
- "CZ",
- "DZ",
- "DK",
- "DJ",
- "ST",
- "DO",
- "EC",
- "EG",
- "SV",
- "ER",
- "ET",
- "FK",
- "FJ",
- "GM",
- "GE",
- "GH",
- "GI",
- "GT",
- "GN",
- "GY",
- "HT",
- "HN",
- "HK",
- "HU",
- "IS",
- "IN",
- "ID",
- "IR",
- "IQ",
- "IE",
- "IL",
- "IT",
- "JM",
- "JP",
- "JO",
- "KZ",
- "KE",
- "KW",
- "LA",
- "LB",
- "LS",
- "LR",
- "LY",
- "LT",
- "MO",
- "MK",
- "MG",
- "MW",
- "MY",
- "MV",
- "MR",
- "MU",
- "MX",
- "MD",
- "MN",
- "MA",
- "MZ",
- "MM",
- "NA",
- "NZ",
- "NI",
- "NG",
- "KP",
- "NO",
- "AR",
- "PK",
- "PG",
- "PY",
- "PE",
- "UY",
- "PH",
- "PL",
- "GB",
- "QA",
- "OM",
- "RO",
- "RU",
- "RW",
- "WS",
- "SG",
- "ST",
- "ZA",
- "KR",
- "LK",
- "SH",
- "SD",
- "SR",
- "SZ",
- "SE",
- "CH",
- "SY",
- "TW",
- "TJ",
- "TZ",
- "TH",
- "TT",
- "TN",
- "TR",
- "UG",
- "UA",
- "US",
- "UZ",
- "VU",
- "VE",
- "VN",
- "ZM",
- "ZW",
- ],
- },
- },
- value: "PL",
- },
- "billing.address.city": {
- required_field: "payment_method_data.billing.address.city",
- display_name: "city",
- field_type: "user_address_city",
- value: "San Fransico",
- },
- "billing.address.zip": {
- required_field: "payment_method_data.billing.address.zip",
- display_name: "zip",
- field_type: "user_address_pincode",
- value: "94122",
- },
},
},
],
@@ -1121,169 +806,12 @@ export const connectorDetails = {
},
],
required_fields: {
- "billing.address.country": {
+ "billing.address.first_name": {
required_field:
- "payment_method_data.billing.address.country",
- display_name: "country",
- field_type: {
- user_address_country: {
- options: [
- "AF",
- "AU",
- "AW",
- "AZ",
- "BS",
- "BH",
- "BD",
- "BB",
- "BZ",
- "BM",
- "BT",
- "BO",
- "BA",
- "BW",
- "BR",
- "BN",
- "BG",
- "BI",
- "KH",
- "CA",
- "CV",
- "KY",
- "CL",
- "CO",
- "KM",
- "CD",
- "CR",
- "CZ",
- "DZ",
- "DK",
- "DJ",
- "ST",
- "DO",
- "EC",
- "EG",
- "SV",
- "ER",
- "ET",
- "FK",
- "FJ",
- "GM",
- "GE",
- "GH",
- "GI",
- "GT",
- "GN",
- "GY",
- "HT",
- "HN",
- "HK",
- "HU",
- "IS",
- "IN",
- "ID",
- "IR",
- "IQ",
- "IE",
- "IL",
- "IT",
- "JM",
- "JP",
- "JO",
- "KZ",
- "KE",
- "KW",
- "LA",
- "LB",
- "LS",
- "LR",
- "LY",
- "LT",
- "MO",
- "MK",
- "MG",
- "MW",
- "MY",
- "MV",
- "MR",
- "MU",
- "MX",
- "MD",
- "MN",
- "MA",
- "MZ",
- "MM",
- "NA",
- "NZ",
- "NI",
- "NG",
- "KP",
- "NO",
- "AR",
- "PK",
- "PG",
- "PY",
- "PE",
- "UY",
- "PH",
- "PL",
- "GB",
- "QA",
- "OM",
- "RO",
- "RU",
- "RW",
- "WS",
- "SG",
- "ST",
- "ZA",
- "KR",
- "LK",
- "SH",
- "SD",
- "SR",
- "SZ",
- "SE",
- "CH",
- "SY",
- "TW",
- "TJ",
- "TZ",
- "TH",
- "TT",
- "TN",
- "TR",
- "UG",
- "UA",
- "US",
- "UZ",
- "VU",
- "VE",
- "VN",
- "ZM",
- "ZW",
- ],
- },
- },
- value: null,
- },
- "billing.address.zip": {
- required_field: "payment_method_data.billing.address.zip",
- display_name: "zip",
- field_type: "user_address_pincode",
- value: null,
- },
- "billing.address.city": {
- required_field: "payment_method_data.billing.address.city",
- display_name: "city",
- field_type: "user_address_city",
- value: null,
- },
- "billing.address.line1": {
- required_field: "payment_method_data.billing.address.line1",
- display_name: "line1",
- field_type: "user_address_line1",
- value: null,
+ "payment_method_data.billing.address.first_name",
+ display_name: "card_holder_name",
+ field_type: "user_full_name",
+ value: "joseph",
},
"payment_method_data.card.card_exp_year": {
required_field: "payment_method_data.card.card_exp_year",
@@ -1322,6 +850,13 @@ export const connectorDetails = {
},
],
required_fields: {
+ "billing.address.first_name": {
+ required_field:
+ "payment_method_data.billing.address.first_name",
+ display_name: "card_holder_name",
+ field_type: "user_full_name",
+ value: "joseph",
+ },
"payment_method_data.card.card_exp_year": {
required_field: "payment_method_data.card.card_exp_year",
display_name: "card_exp_year",
@@ -1340,170 +875,6 @@ export const connectorDetails = {
field_type: "user_card_expiry_month",
value: null,
},
- "billing.address.zip": {
- required_field: "payment_method_data.billing.address.zip",
- display_name: "zip",
- field_type: "user_address_pincode",
- value: null,
- },
- "billing.address.city": {
- required_field: "payment_method_data.billing.address.city",
- display_name: "city",
- field_type: "user_address_city",
- value: null,
- },
- "billing.address.line1": {
- required_field: "payment_method_data.billing.address.line1",
- display_name: "line1",
- field_type: "user_address_line1",
- value: null,
- },
- "billing.address.country": {
- required_field:
- "payment_method_data.billing.address.country",
- display_name: "country",
- field_type: {
- user_address_country: {
- options: [
- "AF",
- "AU",
- "AW",
- "AZ",
- "BS",
- "BH",
- "BD",
- "BB",
- "BZ",
- "BM",
- "BT",
- "BO",
- "BA",
- "BW",
- "BR",
- "BN",
- "BG",
- "BI",
- "KH",
- "CA",
- "CV",
- "KY",
- "CL",
- "CO",
- "KM",
- "CD",
- "CR",
- "CZ",
- "DZ",
- "DK",
- "DJ",
- "ST",
- "DO",
- "EC",
- "EG",
- "SV",
- "ER",
- "ET",
- "FK",
- "FJ",
- "GM",
- "GE",
- "GH",
- "GI",
- "GT",
- "GN",
- "GY",
- "HT",
- "HN",
- "HK",
- "HU",
- "IS",
- "IN",
- "ID",
- "IR",
- "IQ",
- "IE",
- "IL",
- "IT",
- "JM",
- "JP",
- "JO",
- "KZ",
- "KE",
- "KW",
- "LA",
- "LB",
- "LS",
- "LR",
- "LY",
- "LT",
- "MO",
- "MK",
- "MG",
- "MW",
- "MY",
- "MV",
- "MR",
- "MU",
- "MX",
- "MD",
- "MN",
- "MA",
- "MZ",
- "MM",
- "NA",
- "NZ",
- "NI",
- "NG",
- "KP",
- "NO",
- "AR",
- "PK",
- "PG",
- "PY",
- "PE",
- "UY",
- "PH",
- "PL",
- "GB",
- "QA",
- "OM",
- "RO",
- "RU",
- "RW",
- "WS",
- "SG",
- "ST",
- "ZA",
- "KR",
- "LK",
- "SH",
- "SD",
- "SR",
- "SZ",
- "SE",
- "CH",
- "SY",
- "TW",
- "TJ",
- "TZ",
- "TH",
- "TT",
- "TN",
- "TR",
- "UG",
- "UA",
- "US",
- "UZ",
- "VU",
- "VE",
- "VN",
- "ZM",
- "ZW",
- ],
- },
- },
- value: null,
- },
},
},
],
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.js
index cf3268e8a5..cb67a6cd05 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.js
@@ -691,6 +691,9 @@ describe("Card - Refund flow - No 3DS", () => {
"automatic",
globalState
);
+
+ if (shouldContinue)
+ shouldContinue = utils.should_continue_further(data);
});
it("Confirm No 3DS MIT", () => {
@@ -706,6 +709,9 @@ describe("Card - Refund flow - No 3DS", () => {
"automatic",
globalState
);
+
+ if (shouldContinue)
+ shouldContinue = utils.should_continue_further(data);
});
it("refund-call-test", () => {
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00015-ZeroAuthMandate.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00015-ZeroAuthMandate.cy.js
index 82ec8bd24f..5feef678f1 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00015-ZeroAuthMandate.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00015-ZeroAuthMandate.cy.js
@@ -26,6 +26,10 @@ describe("Card - SingleUse Mandates flow test", () => {
}
});
+ it("customer-create-call-test", () => {
+ cy.createCustomerCallTest(fixtures.customerCreateBody, globalState);
+ });
+
it("Confirm No 3DS CIT", () => {
const data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js
index d0e03cc1b9..dfb1f55c32 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js
@@ -26,6 +26,10 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
}
});
+ it("customer-create-call-test", () => {
+ cy.createCustomerCallTest(fixtures.customerCreateBody, globalState);
+ });
+
it("Create No 3DS Payment Intent", () => {
const data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
diff --git a/cypress-tests/cypress/support/commands.js b/cypress-tests/cypress/support/commands.js
index 3a51eeb4de..e94b94ea6c 100644
--- a/cypress-tests/cypress/support/commands.js
+++ b/cypress-tests/cypress/support/commands.js
@@ -50,6 +50,12 @@ function validateErrorMessage(response, resData) {
}
}
+//skip MIT using PMId if connector does not support MIT only
+export function shouldSkipMitUsingPMId(connectorId) {
+ const skipConnectors = ["fiuu"];
+ return skipConnectors.includes(connectorId);
+}
+
Cypress.Commands.add("healthCheck", (globalState) => {
const baseUrl = globalState.get("baseUrl");
const url = `${baseUrl}/health`;
@@ -2138,8 +2144,15 @@ Cypress.Commands.add(
saveCardConfirmBody.payment_token = globalState.get("paymentToken");
saveCardConfirmBody.profile_id = profile_id;
- if (reqData.billing === null) {
- saveCardConfirmBody.billing = null;
+ // Include request data from config but exclude payment_method_data
+ if (reqData) {
+ const requestDataWithoutPMD = Object.fromEntries(
+ Object.entries(reqData).filter(
+ ([key]) =>
+ key !== "payment_method_data" && key !== "customer_acceptance"
+ )
+ );
+ Object.assign(saveCardConfirmBody, requestDataWithoutPMD);
}
cy.request({
@@ -2577,6 +2590,7 @@ Cypress.Commands.add(
const merchant_connector_id = globalState.get(
`${configInfo.merchantConnectorPrefix}Id`
);
+
for (const key in reqData) {
requestBody[key] = reqData[key];
}
@@ -2849,6 +2863,13 @@ Cypress.Commands.add(
globalState,
connector_agnostic_mit
) => {
+ if (shouldSkipMitUsingPMId(globalState.get("connectorId"))) {
+ cy.log(
+ `Skipping mitUsingPMId for connector: ${globalState.get("connectorId")}`
+ );
+ return;
+ }
+
const {
Configs: configs = {},
Request: reqData,