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): Revert Mollie Cypress Changes (#10570)

Anurag1a99bf6e7085
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Mollie.js b/cypress-tests/cypress/e2e/configs/Payment/Mollie.js
deleted file mode 100644
index 6d8dcd0290..0000000000
--- a/cypress-tests/cypress/e2e/configs/Payment/Mollie.js
+++ /dev/null
@@ -1,639 +0,0 @@
-import { customerAcceptance } from "./Commons";
-import { getCustomExchange } from "./Modifiers";
-
-const successfulNo3DSCardDetails = {
- card_number: "4242424242424242",
- card_exp_month: "01",
- card_exp_year: "28",
- card_holder_name: "John",
- card_cvc: "123",
-};
-
-const successfulThreeDSTestCardDetails = {
- card_number: "4242424242424242",
- card_exp_month: "01",
- card_exp_year: "28",
- card_holder_name: "Joseph",
- card_cvc: "123",
-};
-
-const singleUseMandateData = {
- customer_acceptance: customerAcceptance,
- mandate_type: {
- single_use: {
- amount: 8000,
- currency: "USD",
- },
- },
-};
-
-const multiUseMandateData = {
- customer_acceptance: customerAcceptance,
- mandate_type: {
- multi_use: {
- amount: 8000,
- currency: "USD",
- },
- },
-};
-
-const billingAddress = {
- address: {
- line1: "1467",
- line2: "Harrison Street",
- city: "San Francisco",
- state: "California",
- zip: "94122",
- country: "US",
- first_name: "Test",
- last_name: "User",
- },
- phone: {
- number: "9123456789",
- country_code: "+1",
- },
-};
-
-export const connectorDetails = {
- card_pm: {
- PaymentIntent: {
- Request: {
- currency: "USD",
- amount: 6000,
- customer_acceptance: null,
- setup_future_usage: "on_session",
- },
- Response: {
- status: 200,
- body: {
- status: "requires_payment_method",
- },
- },
- },
- PaymentIntentWithShippingCost: {
- Request: {
- currency: "USD",
- amount: 6000,
- shipping_cost: 50,
- },
- Response: {
- status: 200,
- body: {
- status: "requires_payment_method",
- amount: 6000,
- shipping_cost: 50,
- },
- },
- },
- 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,
- },
- },
- },
- "3DSManualCapture": {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulThreeDSTestCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
- setup_future_usage: "on_session",
- },
- Response: {
- status: 400,
- body: {
- error: {
- code: "IR_19",
- message: "Payment method type not supported",
- reason: "3DS flow is not supported by Mollie",
- type: "invalid_request",
- },
- },
- },
- },
- // 3DS automatic capture
- "3DSAutoCapture": {
- config: {
- TRIGGER_SKIP: true,
- },
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulThreeDSTestCardDetails,
- },
- amount: 6000,
- currency: "USD",
- customer_acceptance: null,
- setup_future_usage: "on_session",
- },
- Response: {
- status: 400,
- body: {
- error: {
- code: "IR_19",
- message: "Payment method type not supported",
- reason: "3DS flow is not supported by Mollie",
- type: "invalid_request",
- },
- },
- },
- },
- No3DSManualCapture: {
- Request: {
- payment_method: "card",
- amount: 6000,
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
- setup_future_usage: "on_session",
- billing: billingAddress,
- },
- Response: {
- status: 200,
- body: {
- status: "requires_capture",
- },
- },
- },
- No3DSAutoCapture: {
- Request: {
- payment_method: "card",
- amount: 6000,
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- customer_acceptance: null,
- setup_future_usage: "on_session",
- billing: billingAddress,
- },
- Response: {
- status: 200,
- body: {
- status: "succeeded",
- },
- },
- },
- Capture: getCustomExchange({
- Request: {
- amount_to_capture: 6000,
- },
- Response: {
- status: 200,
- body: {
- status: "processing",
- amount: 6000,
- amount_capturable: 6000,
- },
- },
- ResponseCustom: {
- status: 400,
- body: {
- error: {
- code: "IR_14",
- message:
- "This Payment could not be captured because it has a payment.status of succeeded. The expected state is requires_capture, partially_captured_and_capturable, processing",
- type: "invalid_request",
- },
- },
- },
- }),
- PartialCapture: {
- Request: {
- amount_to_capture: 2000,
- },
- Response: {
- status: 200,
- body: {
- status: "processing",
- amount: 6000,
- amount_capturable: 6000,
- },
- },
- },
- Void: getCustomExchange({
- Request: {},
- Response: {
- status: 400,
- body: {
- error: {
- code: "IR_20",
- message: "Void flow not supported",
- connector: "mollie",
- type: "invalid_request",
- },
- },
- },
- ResponseCustom: {
- status: 200,
- body: {
- status: "cancelled",
- },
- },
- }),
- VoidAfterConfirm: {
- Request: {},
- Response: {
- status: 400,
- body: {
- error: {
- code: "IR_20",
- message: "Void flow not supported",
- connector: "mollie",
- type: "invalid_request",
- },
- },
- },
- },
- Refund: {
- Request: {
- amount: 6000,
- },
- Response: {
- status: 200,
- body: {
- status: "pending",
- },
- },
- },
- PartialRefund: getCustomExchange({
- Request: {
- amount: 2000,
- },
- Response: {
- status: 200,
- body: {
- status: "pending",
- },
- },
- ResponseCustom: {
- status: 200,
- body: {
- status: "failed",
- },
- },
- }),
- manualPaymentRefund: {
- Request: {
- amount: 6000,
- },
- Response: {
- status: 200,
- body: {
- status: "pending",
- },
- },
- },
- manualPaymentPartialRefund: getCustomExchange({
- Request: {
- amount: 2000,
- },
- Response: {
- status: 200,
- body: {
- status: "pending",
- },
- },
- ResponseCustom: {
- status: 200,
- body: {
- status: "failed",
- },
- },
- }),
- SyncRefund: getCustomExchange({
- Request: {},
- Response: {
- status: 200,
- body: {
- status: "pending",
- },
- },
- ResponseCustom: {
- status: 200,
- body: {
- status: "failed",
- },
- },
- }),
- ZeroAuthMandate: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- },
- Response: {
- status: 400,
- body: {
- error: {
- code: "IR_04",
- message: "Missing required param: payment_method_token",
- type: "invalid_request",
- },
- },
- },
- },
- ZeroAuthPaymentIntent: {
- Request: {
- amount: 0,
- setup_future_usage: "off_session",
- currency: "USD",
- },
- Response: {
- status: 200,
- body: {
- status: "requires_payment_method",
- },
- },
- },
- ZeroAuthConfirmPayment: {
- Request: {
- payment_type: "setup_mandate",
- payment_method: "card",
- payment_method_type: "credit",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- },
- Response: {
- status: 200,
- body: {
- status: "succeeded",
- },
- },
- },
- SaveCardUseNo3DSAutoCapture: {
- Request: {
- payment_method: "card",
- amount: 6000,
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- setup_future_usage: "on_session",
- customer_acceptance: customerAcceptance,
- },
- Response: {
- status: 200,
- body: {
- status: "succeeded",
- },
- },
- },
- SaveCardUseNo3DSManualCapture: {
- Request: {
- payment_method: "card",
- amount: 6000,
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- setup_future_usage: "on_session",
- customer_acceptance: customerAcceptance,
- },
- Response: {
- status: 200,
- body: {
- status: "requires_capture",
- },
- },
- },
- SaveCardUseNo3DSManualCaptureOffSession: {
- Configs: {
- TRIGGER_SKIP: true,
- },
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- setup_future_usage: "off_session",
- customer_acceptance: customerAcceptance,
- },
- Response: {
- status: 200,
- body: {
- status: "succeeded",
- },
- },
- },
- SaveCardConfirmManualCaptureOffSession: {
- Request: {
- setup_future_usage: "off_session",
- },
- Response: {
- status: 200,
- body: {
- status: "succeeded",
- },
- },
- },
- 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,
- },
- Response: {
- status: 200,
- body: {
- status: "succeeded",
- },
- },
- },
- MandateSingleUseNo3DSAutoCapture: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- mandate_data: singleUseMandateData,
- },
- Response: {
- status: 200,
- body: {
- status: "succeeded",
- },
- },
- },
- MandateMultiUseNo3DSManualCapture: {
- Configs: {
- TRIGGER_SKIP: true,
- },
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- mandate_data: multiUseMandateData,
- },
- Response: {
- status: 200,
- body: {
- status: "requires_capture",
- },
- },
- },
- MandateMultiUseNo3DSAutoCapture: {
- Configs: {
- TRIGGER_SKIP: true,
- },
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- mandate_data: multiUseMandateData,
- },
- Response: {
- status: 200,
- body: {
- status: "succeeded",
- },
- },
- },
- MandateSingleUseNo3DSManualCapture: {
- Configs: {
- TRIGGER_SKIP: true,
- },
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- mandate_data: singleUseMandateData,
- },
- Response: {
- status: 200,
- body: {
- status: "succeeded",
- },
- },
- },
- PaymentMethodIdMandateNo3DSManualCapture: {
- Configs: {
- TRIGGER_SKIP: true,
- },
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- mandate_data: null,
- customer_acceptance: customerAcceptance,
- },
- Response: {
- status: 200,
- body: {
- status: "succeeded",
- },
- },
- },
- MITAutoCapture: {
- Request: {
- description: "Test Payment",
- },
- Response: {
- status: 200,
- body: {
- status: "succeeded",
- },
- },
- },
- PaymentMethodIdMandateNo3DSAutoCapture: {
- Request: {
- payment_method: "card",
- payment_method_data: {
- card: successfulNo3DSCardDetails,
- },
- currency: "USD",
- mandate_data: null,
- customer_acceptance: customerAcceptance,
- },
- Response: {
- status: 200,
- body: {
- status: "succeeded",
- },
- },
- },
- PaymentIntentOffSession: {
- Request: {
- currency: "EUR",
- amount: 6000,
- authentication_type: "no_three_ds",
- customer_acceptance: null,
- setup_future_usage: "off_session",
- },
- Response: {
- status: 200,
- body: {
- status: "requires_payment_method",
- setup_future_usage: "off_session",
- },
- },
- },
- },
- SaveCardConfirmAutoCaptureOffSession: {
- Request: {},
- Response: {
- status: 200,
- body: {
- status: "succeeded",
- },
- },
- },
- MITManualCapture: {
- Request: {
- currency: "EUR",
- },
- Response: {
- status: 200,
- body: {
- status: "succeeded",
- },
- },
- },
- MITWithoutBillingAddress: {
- Request: {
- description: "Test Payment",
- },
- Response: {
- status: 200,
- body: {
- status: "succeeded",
- },
- },
- },
-};
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Utils.js b/cypress-tests/cypress/e2e/configs/Payment/Utils.js
index 760959637c..812bc3dc19 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Utils.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Utils.js
@@ -36,7 +36,6 @@ import { connectorDetails as hipayConnectorDetails } from "./Hipay.js";
import { connectorDetails as iatapayConnectorDetails } from "./Iatapay.js";
import { connectorDetails as itaubankConnectorDetails } from "./ItauBank.js";
import { connectorDetails as jpmorganConnectorDetails } from "./Jpmorgan.js";
-import { connectorDetails as mollieConnectorDetails } from "./Mollie.js";
import { connectorDetails as monerisConnectorDetails } from "./Moneris.js";
import { connectorDetails as multisafepayConnectorDetails } from "./Multisafepay.js";
import { connectorDetails as nexinetsConnectorDetails } from "./Nexinets.js";
@@ -102,7 +101,6 @@ const connectorDetails = {
iatapay: iatapayConnectorDetails,
itaubank: itaubankConnectorDetails,
jpmorgan: jpmorganConnectorDetails,
- mollie: mollieConnectorDetails,
moneris: monerisConnectorDetails,
multisafepay: multisafepayConnectorDetails,
nexinets: nexinetsConnectorDetails,
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00007-VoidPayment.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00007-VoidPayment.cy.js
index 2cdaf48e05..c298f16483 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00007-VoidPayment.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00007-VoidPayment.cy.js
@@ -109,12 +109,7 @@ describe("Card - NoThreeDS Manual payment flow test", () => {
"card_pm"
]["Void"];
- const newData = {
- ...data,
- Response: data.ResponseCustom || data.Response,
- };
-
- cy.voidCallTest(fixtures.voidBody, newData, globalState);
+ cy.voidCallTest(fixtures.voidBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
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 9cd9a3d9c4..d2da9e92ae 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.js
@@ -135,12 +135,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["PartialRefund"];
- const newData = {
- ...data,
- Response: data.Response || data.ResponseCustom,
- };
-
- cy.refundCallTest(fixtures.refundBody, newData, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -150,12 +145,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["PartialRefund"];
- const newData = {
- ...data,
- Response: data.ResponseCustom || data.Response,
- };
-
- cy.refundCallTest(fixtures.refundBody, newData, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -165,12 +155,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["SyncRefund"];
- const newData = {
- ...data,
- Response: data.ResponseCustom || data.Response,
- };
-
- cy.syncRefundCallTest(newData, globalState);
+ cy.syncRefundCallTest(data, globalState);
if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
@@ -288,12 +273,7 @@ describe("Card - Refund flow - No 3DS", () => {
"card_pm"
]["PartialRefund"];
- const newData = {
- ...data,
- Response: data.ResponseCustom || data.Response,
- };
-
- cy.refundCallTest(fixtures.refundBody, newData, globalState);
+ cy.refundCallTest(fixtures.refundBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -588,7 +568,7 @@ describe("Card - Refund flow - No 3DS", () => {
const newData = {
...data,
- Response: data.Response || data.ResponseCustom,
+ Response: data.ResponseCustom || data.Response,
};
cy.refundCallTest(fixtures.refundBody, newData, globalState);
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 4f83956f8b..849ebd7df2 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js
@@ -151,12 +151,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
"card_pm"
]["Capture"];
- const newData = {
- ...data,
- Response: data.ResponseCustom || data.Response,
- };
-
- cy.captureCallTest(fixtures.captureBody, newData, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);
@@ -316,12 +311,7 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
"card_pm"
]["Capture"];
- const newData = {
- ...data,
- Response: data.ResponseCustom || data.Response,
- };
-
- cy.captureCallTest(fixtures.captureBody, newData, globalState);
+ cy.captureCallTest(fixtures.captureBody, data, globalState);
if (shouldContinue)
shouldContinue = utils.should_continue_further(data);