From 8b68fdd6ff8a223495b897113ca3e1b109c84539 Mon Sep 17 00:00:00 2001 From: likhinbopanna <131246334+likhinbopanna@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:06:45 +0530 Subject: [PATCH] ci(cypress): Fix Iatapay Zero Auth Mandates Flow (#6552) --- .../cypress/e2e/PaymentUtils/Iatapay.js | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/cypress-tests/cypress/e2e/PaymentUtils/Iatapay.js b/cypress-tests/cypress/e2e/PaymentUtils/Iatapay.js index 3eddf0530155..faa810e7bad5 100644 --- a/cypress-tests/cypress/e2e/PaymentUtils/Iatapay.js +++ b/cypress-tests/cypress/e2e/PaymentUtils/Iatapay.js @@ -1,3 +1,11 @@ +const successfulNo3DSCardDetails = { + card_number: "4111111111111111", + card_exp_month: "03", + card_exp_year: "30", + card_holder_name: "John Doe", + card_cvc: "737", +}; + export const connectorDetails = { bank_redirect_pm: { Ideal: { @@ -46,6 +54,40 @@ export const connectorDetails = { }, }, }, + 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: 501, + body: { + error: { + type: "invalid_request", + message: "Setup Mandate flow for Iatapay is not implemented", + code: "IR_00", + }, + }, + }, + }, }, upi_pm: { PaymentIntent: {