diff --git a/cypress-tests/cypress/e2e/configs/Payment/Checkout.js b/cypress-tests/cypress/e2e/configs/Payment/Checkout.js index ce206db09a..0e59ec2de2 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Checkout.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Checkout.js @@ -23,6 +23,14 @@ const customerAcceptance = { }, }; +const failedNo3DSCardDetails = { + card_number: "4276038578596818", + card_exp_month: "03", + card_exp_year: "30", + card_holder_name: "joseph Doe", + card_cvc: "737", +}; + const singleUseMandateData = { customer_acceptance: customerAcceptance, mandate_type: { @@ -585,5 +593,82 @@ export const connectorDetails = { }, }, }, + No3DSFailPayment: { + Request: { + payment_method: "card", + payment_method_data: { + card: failedNo3DSCardDetails, + }, + customer_acceptance: null, + setup_future_usage: "on_session", + }, + Response: { + status: 200, + body: { + status: "failed", + error_code: "2005C", + error_message: "Transaction not supported/blocked by issuer", + }, + }, + }, + ManualRetryPaymentDisabled: { + Request: { + payment_method: "card", + payment_method_data: { + card: successfulNo3DSCardDetails, + }, + currency: "USD", + customer_acceptance: null, + setup_future_usage: "on_session", + }, + Response: { + status: 400, + body: { + type: "invalid_request", + message: + "You cannot confirm this payment because it has status failed, you can enable `manual_retry` in profile to try this payment again", + code: "IR_16", + }, + }, + }, + ManualRetryPaymentEnabled: { + Request: { + payment_method: "card", + payment_method_data: { + card: successfulNo3DSCardDetails, + }, + currency: "USD", + customer_acceptance: null, + setup_future_usage: "on_session", + }, + Response: { + status: 200, + body: { + status: "succeeded", + payment_method: "card", + attempt_count: 2, + }, + }, + }, + ManualRetryPaymentCutoffExpired: { + Request: { + payment_method: "card", + payment_method_data: { + card: successfulNo3DSCardDetails, + }, + currency: "USD", + customer_acceptance: null, + setup_future_usage: "on_session", + }, + Response: { + status: 400, + body: { + type: "invalid_request", + message: + "You cannot confirm this payment using `manual_retry` because the allowed duration has expired", + code: "IR_16", + }, + }, + }, }, }; diff --git a/cypress-tests/cypress/e2e/configs/Payment/Nuvei.js b/cypress-tests/cypress/e2e/configs/Payment/Nuvei.js index ca0f3d18b8..e46b3322cb 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Nuvei.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Nuvei.js @@ -16,6 +16,15 @@ const successfulThreeDSCardDetails = { card_holder_name: "CL-BRW1", card_cvc: "123", }; + +const failedNo3DSCardDetails = { + card_number: "4008370896662369", + card_exp_month: "01", + card_exp_year: "35", + card_holder_name: "joseph Doe", + card_cvc: "123", +}; + const singleUseMandateData = { customer_acceptance: customerAcceptance, mandate_type: { @@ -707,6 +716,24 @@ export const connectorDetails = { }, }, }, + No3DSFailPayment: { + Request: { + payment_method: "card", + payment_method_data: { + card: failedNo3DSCardDetails, + }, + customer_acceptance: null, + setup_future_usage: "on_session", + }, + Response: { + status: 200, + body: { + status: "failed", + error_code: "-1", + error_message: "Decline", + }, + }, + }, }, // Bank redirect payment methods bank_redirect_pm: { diff --git a/cypress-tests/cypress/e2e/configs/Payment/Paypal.js b/cypress-tests/cypress/e2e/configs/Payment/Paypal.js index 857830281a..9a77079c6c 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Paypal.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Paypal.js @@ -16,6 +16,14 @@ const successfulThreeDSTestCardDetails = { card_cvc: "123", }; +const failedNo3DSCardDetails = { + card_number: "4012888888881881", + card_exp_month: "01", + card_exp_year: "35", + card_holder_name: "CCREJECT-REFUSED", + card_cvc: "123", +}; + const customerAcceptance = { acceptance_type: "offline", accepted_at: "1963-05-03T04:07:52.723Z", @@ -667,6 +675,83 @@ export const connectorDetails = { }, }, }, + No3DSFailPayment: { + Request: { + payment_method: "card", + payment_method_data: { + card: failedNo3DSCardDetails, + }, + customer_acceptance: null, + setup_future_usage: "on_session", + }, + Response: { + status: 200, + body: { + status: "failed", + error_code: "0500", + error_message: "DO_NOT_HONOR.", + }, + }, + }, + ManualRetryPaymentDisabled: { + Request: { + payment_method: "card", + payment_method_data: { + card: successfulNo3DSCardDetails, + }, + currency: "USD", + customer_acceptance: null, + setup_future_usage: "on_session", + }, + Response: { + status: 400, + body: { + type: "invalid_request", + message: + "You cannot confirm this payment because it has status failed, you can enable `manual_retry` in profile to try this payment again", + code: "IR_16", + }, + }, + }, + ManualRetryPaymentEnabled: { + Request: { + payment_method: "card", + payment_method_data: { + card: successfulNo3DSCardDetails, + }, + currency: "USD", + customer_acceptance: null, + setup_future_usage: "on_session", + }, + Response: { + status: 200, + body: { + status: "succeeded", + payment_method: "card", + attempt_count: 2, + }, + }, + }, + ManualRetryPaymentCutoffExpired: { + Request: { + payment_method: "card", + payment_method_data: { + card: successfulNo3DSCardDetails, + }, + currency: "USD", + customer_acceptance: null, + setup_future_usage: "on_session", + }, + Response: { + status: 400, + body: { + type: "invalid_request", + message: + "You cannot confirm this payment using `manual_retry` because the allowed duration has expired", + code: "IR_16", + }, + }, + }, }, bank_redirect_pm: { Ideal: { diff --git a/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js b/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js index f37d846349..8706f5d092 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js @@ -20,6 +20,14 @@ const successfulThreeDSTestCardDetails = { card_cvc: "737", }; +const failedNo3DSCardDetails = { + card_number: "4900490000000519", + card_exp_month: "01", + card_exp_year: "35", + card_holder_name: "CCREJECT-REFUSED", + card_cvc: "123", +}; + const singleUseMandateData = { customer_acceptance: customerAcceptance, mandate_type: { @@ -533,6 +541,83 @@ export const connectorDetails = { }, }, }, + No3DSFailPayment: { + Request: { + payment_method: "card", + payment_method_data: { + card: failedNo3DSCardDetails, + }, + customer_acceptance: null, + setup_future_usage: "on_session", + }, + Response: { + status: 200, + body: { + status: "failed", + error_code: "85", + error_message: "the card is not enrolled for a supported 3DS version", + }, + }, + }, + ManualRetryPaymentDisabled: { + Request: { + payment_method: "card", + payment_method_data: { + card: successfulNo3DSCardDetails, + }, + currency: "USD", + customer_acceptance: null, + setup_future_usage: "on_session", + }, + Response: { + status: 400, + body: { + type: "invalid_request", + message: + "You cannot confirm this payment because it has status failed, you can enable `manual_retry` in profile to try this payment again", + code: "IR_16", + }, + }, + }, + ManualRetryPaymentEnabled: { + Request: { + payment_method: "card", + payment_method_data: { + card: successfulNo3DSCardDetails, + }, + currency: "USD", + customer_acceptance: null, + setup_future_usage: "on_session", + }, + Response: { + status: 200, + body: { + status: "succeeded", + payment_method: "card", + attempt_count: 2, + }, + }, + }, + ManualRetryPaymentCutoffExpired: { + Request: { + payment_method: "card", + payment_method_data: { + card: successfulNo3DSCardDetails, + }, + currency: "USD", + customer_acceptance: null, + setup_future_usage: "on_session", + }, + Response: { + status: 400, + body: { + type: "invalid_request", + message: + "You cannot confirm this payment using `manual_retry` because the allowed duration has expired", + code: "IR_16", + }, + }, + }, }, bank_redirect_pm: { Ideal: { diff --git a/cypress-tests/cypress/e2e/configs/Payment/Utils.js b/cypress-tests/cypress/e2e/configs/Payment/Utils.js index 155c4828f3..a397ee234c 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Utils.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Utils.js @@ -446,6 +446,7 @@ export const CONNECTOR_LISTS = { OVERCAPTURE: ["adyen"], MANUAL_RETRY: [ "cybersource", + "checkout", "stripe", "adyen", "airwallex", @@ -456,10 +457,14 @@ export const CONNECTOR_LISTS = { "fiuu", "globalpay", "nexinets", + "nuvei", + "paypal", "powertranz", "shift4", + "trustpay", "worldpay", "worldpayvantiv", + "worldpayxml", ], PAYMENTS_WEBHOOK: ["noon", "stripe", "authorizedotnet"], // Add more inclusion lists