diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js index 74ffd403699..9bcecf60570 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js @@ -135,7 +135,7 @@ export const connectorDetails = { amount_to_capture: 6000, }, Response: { - status: 200, + status: 400, body: { status: "succeeded", amount: 6000, @@ -172,7 +172,6 @@ export const connectorDetails = { amount: 6000, }, Response: { - status: 200, body: { status: "pending", }, @@ -234,6 +233,9 @@ export const connectorDetails = { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, + billing: { + email: "johndoe@gmail.com", + }, }, currency: "USD", mandate_data: singleUseMandateData, @@ -250,6 +252,9 @@ export const connectorDetails = { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, + billing: { + email: "johndoe@gmail.com", + }, }, currency: "USD", mandate_data: singleUseMandateData, @@ -296,6 +301,9 @@ export const connectorDetails = { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, + billing: { + email: "johndoe@gmail.com", + }, }, currency: "USD", mandate_data: multiUseMandateData, @@ -342,7 +350,7 @@ export const connectorDetails = { MITAutoCapture: { Request: {}, Response: { - status: 200, + status: 400, body: { status: "failed", error_code: "The currency not allow for the RecordType", @@ -569,9 +577,10 @@ export const connectorDetails = { setup_future_usage: "off_session", }, Response: { - status: 200, + status: 400, body: { - status: "succeeded", + status: "failed", + error_message: "The currency not allow for the RecordType", }, }, }, @@ -582,7 +591,8 @@ export const connectorDetails = { Response: { status: 200, body: { - status: "requires_capture", + status: "failed", + error_message: "The currency not allow for the RecordType", }, }, }, @@ -701,5 +711,77 @@ export const connectorDetails = { }, }, }, + PaymentConfirmWithShippingCost: { + Response: { + status: 200, + body: { + status: "succeeded", + shipping_cost: 50, + amount_received: 6050, + amount: 6000, + net_amount: 6050, + }, + }, + }, + ZeroAuthMandate: { + Request: { + payment_method: "card", + payment_method_data: { + card: successfulNo3DSCardDetails, + }, + currency: "USD", + mandate_data: singleUseMandateData, + }, + Response: { + status: 200, + body: { + status: "processing", + }, + }, + }, + SaveCardConfirmAutoCaptureOffSessionWithoutBilling: { + Request: { + setup_future_usage: "off_session", + billing: null, + }, + Response: { + status: 200, + body: { + status: "failed", + error_message: "The currency not allow for the RecordType", + }, + }, + }, + ZeroAuthPaymentIntent: { + Request: { + amount: 0, + setup_future_usage: "off_session", + currency: "USD", + }, + 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, + }, + }, + Response: { + status: 200, + body: { + status: "processing", + setup_future_usage: "off_session", + }, + }, + }, }, }; diff --git a/cypress-tests/cypress/e2e/configs/Payment/Modifiers.js b/cypress-tests/cypress/e2e/configs/Payment/Modifiers.js index a2fa7642e74..bf60ec788e0 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Modifiers.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Modifiers.js @@ -16,7 +16,6 @@ function normalize(input) { paybox: "Paybox", paypal: "Paypal", wellsfargo: "Wellsfargo", - fiuu: "Fiuu", noon: "Noon", // Add more known exceptions here }; diff --git a/cypress-tests/cypress/support/commands.js b/cypress-tests/cypress/support/commands.js index fc25220b80b..defc54e9b29 100644 --- a/cypress-tests/cypress/support/commands.js +++ b/cypress-tests/cypress/support/commands.js @@ -2725,10 +2725,19 @@ Cypress.Commands.add( response.body.payment_method_id, "payment_method_id" ).to.include("pm_").and.to.not.be.null; - expect( - response.body.connector_transaction_id, - "connector_transaction_id" - ).to.not.be.null; + + if (response.body.status === "failed") { + expect( + response.body.connector_transaction_id, + "connector_transaction_id" + ).to.be.null; + } else { + expect( + response.body.connector_transaction_id, + "connector_transaction_id" + ).to.not.be.null; + } + expect( response.body.payment_method_status, "payment_method_status"