From 59ded4c48ee803b36488e383cd64134cef2bf016 Mon Sep 17 00:00:00 2001 From: Arindam Sahoo Date: Tue, 18 Feb 2025 17:56:40 +0530 Subject: [PATCH 01/17] refactor(cypress): add payment confirmation response with shipping cost for connector Fiuu --- cypress-tests/cypress/e2e/configs/Payment/Fiuu.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js index 74ffd403699..6d03571705b 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js @@ -701,5 +701,17 @@ export const connectorDetails = { }, }, }, + PaymentConfirmWithShippingCost: { + Response: { + status: 200, + body: { + status: "succeeded", + shipping_cost: 50, + amount_received: 6050, + amount: 6000, + net_amount: 6050, + }, + }, + }, }, }; From 0f17afbffe646bb3d0bcd7815da9969beea7fa9f Mon Sep 17 00:00:00 2001 From: Arindam Sahoo Date: Wed, 19 Feb 2025 09:26:49 +0530 Subject: [PATCH 02/17] refactor(cypress): update refund response status for Fiuu connector --- cypress-tests/cypress/e2e/configs/Payment/Fiuu.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js index 6d03571705b..36e31e5e353 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js @@ -168,13 +168,9 @@ export const connectorDetails = { }, }, Refund: { - Request: { - amount: 6000, - }, Response: { - status: 200, + status: 400, body: { - status: "pending", }, }, }, From 76f1156531ebc65c41028655882990787067c7fb Mon Sep 17 00:00:00 2001 From: "hyperswitch-bot[bot]" <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 03:57:46 +0000 Subject: [PATCH 03/17] chore(cypress): run formatter and address lints --- cypress-tests/cypress/e2e/configs/Payment/Fiuu.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js index 36e31e5e353..3135479b91b 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js @@ -170,8 +170,7 @@ export const connectorDetails = { Refund: { Response: { status: 400, - body: { - }, + body: {}, }, }, PartialRefund: { From 5eda0e5887ed74cf2f90dacd551124b7b0d661d7 Mon Sep 17 00:00:00 2001 From: Arindam Sahoo Date: Wed, 19 Feb 2025 15:12:58 +0530 Subject: [PATCH 04/17] refactor(cypress): add billing email to payment method data and remove capture status --- cypress-tests/cypress/e2e/configs/Payment/Fiuu.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js index 36e31e5e353..d4a88ea637f 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js @@ -135,7 +135,6 @@ export const connectorDetails = { amount_to_capture: 6000, }, Response: { - status: 200, body: { status: "succeeded", amount: 6000, @@ -230,6 +229,9 @@ export const connectorDetails = { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, + billing: { + email: "mauro.morandi@nexi.it", + }, }, currency: "USD", mandate_data: singleUseMandateData, @@ -246,6 +248,9 @@ export const connectorDetails = { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, + billing: { + email: "mauro.morandi@nexi.it" + }, }, currency: "USD", mandate_data: singleUseMandateData, From 7f81dbe506eca596cffcf76ca384c095cee3883a Mon Sep 17 00:00:00 2001 From: Arindam Sahoo Date: Wed, 19 Feb 2025 15:46:57 +0530 Subject: [PATCH 05/17] refactor(cypress): update billing email for Save Card No3DS Flows --- cypress-tests/cypress/e2e/configs/Payment/Fiuu.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js index d7193d12590..31ab00357cb 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js @@ -229,7 +229,7 @@ export const connectorDetails = { payment_method_data: { card: successfulNo3DSCardDetails, billing: { - email: "mauro.morandi@nexi.it", + email: "johndoe@gmail.com", }, }, currency: "USD", @@ -248,7 +248,7 @@ export const connectorDetails = { payment_method_data: { card: successfulNo3DSCardDetails, billing: { - email: "mauro.morandi@nexi.it" + email: "johndoe@gmail.com" }, }, currency: "USD", @@ -296,6 +296,9 @@ export const connectorDetails = { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, + billing: { + email: "johndoe@gmail.com", + }, }, currency: "USD", mandate_data: multiUseMandateData, From 37867e8eaa4ce70a98180d3818a1c148c0c85f9c Mon Sep 17 00:00:00 2001 From: Arindam Sahoo Date: Wed, 19 Feb 2025 15:46:57 +0530 Subject: [PATCH 06/17] refactor(cypress): update billing email for Save Card No3DS Flows --- cypress-tests/cypress/e2e/configs/Payment/Fiuu.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js index d7193d12590..31ab00357cb 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js @@ -229,7 +229,7 @@ export const connectorDetails = { payment_method_data: { card: successfulNo3DSCardDetails, billing: { - email: "mauro.morandi@nexi.it", + email: "johndoe@gmail.com", }, }, currency: "USD", @@ -248,7 +248,7 @@ export const connectorDetails = { payment_method_data: { card: successfulNo3DSCardDetails, billing: { - email: "mauro.morandi@nexi.it" + email: "johndoe@gmail.com" }, }, currency: "USD", @@ -296,6 +296,9 @@ export const connectorDetails = { payment_method: "card", payment_method_data: { card: successfulNo3DSCardDetails, + billing: { + email: "johndoe@gmail.com", + }, }, currency: "USD", mandate_data: multiUseMandateData, From 323b32471f90040b5d9c9feccb29d148b0c8b7da Mon Sep 17 00:00:00 2001 From: Arindam Sahoo Date: Wed, 19 Feb 2025 16:29:39 +0530 Subject: [PATCH 07/17] refactor(cypress): update Refund request and response structure in Fiuu.js --- cypress-tests/cypress/e2e/configs/Payment/Fiuu.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js index 31ab00357cb..0498239fb0b 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js @@ -166,10 +166,15 @@ export const connectorDetails = { }, }, }, - Refund: { + Refund: { + Request: { + amount: 6000, + }, Response: { - status: 400, - body: {}, + // status: 200, + body: { + status: "pending", + }, }, }, PartialRefund: { From b3f6b719ab0e07c515e91b92743a43c1e281fdff Mon Sep 17 00:00:00 2001 From: Arindam Sahoo Date: Wed, 19 Feb 2025 16:30:55 +0530 Subject: [PATCH 08/17] refactor(cypress): clean up Refund request structure in Fiuu.js --- cypress-tests/cypress/e2e/configs/Payment/Fiuu.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js index 0498239fb0b..3d8bfb4b4ff 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js @@ -166,12 +166,11 @@ export const connectorDetails = { }, }, }, - Refund: { + Refund: { Request: { amount: 6000, }, Response: { - // status: 200, body: { status: "pending", }, From a7427497d58d5a8d52cb7f43bbbd82ae1c388f38 Mon Sep 17 00:00:00 2001 From: "hyperswitch-bot[bot]" <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 12:05:46 +0000 Subject: [PATCH 09/17] chore(cypress): run formatter and address lints --- cypress-tests/cypress/e2e/configs/Payment/Fiuu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js index 3d8bfb4b4ff..63740f1a071 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js @@ -252,7 +252,7 @@ export const connectorDetails = { payment_method_data: { card: successfulNo3DSCardDetails, billing: { - email: "johndoe@gmail.com" + email: "johndoe@gmail.com", }, }, currency: "USD", From 0bef3bf17333bea7dc931ab182076bbf6810b8a5 Mon Sep 17 00:00:00 2001 From: Arindam Sahoo Date: Wed, 19 Feb 2025 23:11:36 +0530 Subject: [PATCH 10/17] refactor(cypress): add ZeroAuthMandate request and response configs --- .../cypress/e2e/configs/Payment/Fiuu.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js index 3d8bfb4b4ff..0759f24ba2f 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js @@ -720,5 +720,21 @@ export const connectorDetails = { }, }, }, + ZeroAuthMandate: { + Request: { + payment_method: "card", + payment_method_data: { + card: successfulNo3DSCardDetails, + }, + currency: "USD", + mandate_data: singleUseMandateData, + }, + Response: { + status: 200, + body: { + status: "processing", + }, + }, + }, }, }; From ec4b39a4011e2368bc7584baf615121474f3cd09 Mon Sep 17 00:00:00 2001 From: Arindam Sahoo Date: Wed, 19 Feb 2025 23:40:07 +0530 Subject: [PATCH 11/17] refactor(cypress): update Fiuu.js to handle failed currency validation responses --- .../cypress/e2e/configs/Payment/Fiuu.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js index 1218a2c7fe4..188782ee06e 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js @@ -578,7 +578,8 @@ export const connectorDetails = { Response: { status: 200, body: { - status: "succeeded", + status: "failed", + error_message: "The currency not allow for the RecordType", }, }, }, @@ -589,7 +590,8 @@ export const connectorDetails = { Response: { status: 200, body: { - status: "requires_capture", + status: "failed", + error_message: "The currency not allow for the RecordType", }, }, }, @@ -736,5 +738,18 @@ export const connectorDetails = { }, }, }, + SaveCardConfirmAutoCaptureOffSessionWithoutBilling: { + Request: { + setup_future_usage: "off_session", + billing: null, + }, + Response: { + status: 200, + body: { + status: "failed", + error_message: "The currency not allow for the RecordType", + }, + }, + }, }, }; From bdabf1a2d62012e46d24d77efedcbd51b1064e5b Mon Sep 17 00:00:00 2001 From: Arindam Sahoo Date: Wed, 19 Feb 2025 23:45:59 +0530 Subject: [PATCH 12/17] refactor(cypress): add ZeroAuthPaymentIntent and ZeroAuthConfirmPayment configs --- .../cypress/e2e/configs/Payment/Fiuu.js | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js index 188782ee06e..c83aa6edadc 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js @@ -751,5 +751,36 @@ 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: 200, + body: { + status: "processing", + setup_future_usage: "off_session", + }, + }, + }, }, }; From 5083f9228f0f5c0ba38d8b84567622b331838257 Mon Sep 17 00:00:00 2001 From: Arindam Sahoo Date: Thu, 20 Feb 2025 11:45:52 +0530 Subject: [PATCH 13/17] refactor(cypress): remove 'fiuu' from payment modifiers exception --- cypress-tests/cypress/e2e/configs/Payment/Modifiers.js | 1 - 1 file changed, 1 deletion(-) 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 }; From eae7f749f6b63648627a2ae63096663cac3e5a1b Mon Sep 17 00:00:00 2001 From: Arindam Sahoo Date: Thu, 20 Feb 2025 12:02:38 +0530 Subject: [PATCH 14/17] refactor(cypress): remove status 200 from failed currency validation responses so that the errors get verified --- cypress-tests/cypress/e2e/configs/Payment/Fiuu.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js index c83aa6edadc..ebce72ef365 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js @@ -349,7 +349,6 @@ export const connectorDetails = { MITAutoCapture: { Request: {}, Response: { - status: 200, body: { status: "failed", error_code: "The currency not allow for the RecordType", @@ -576,7 +575,6 @@ export const connectorDetails = { setup_future_usage: "off_session", }, Response: { - status: 200, body: { status: "failed", error_message: "The currency not allow for the RecordType", From 71c3fa97f6b86cab73872a3b61ebb0512ec4c2ba Mon Sep 17 00:00:00 2001 From: Arindam Sahoo Date: Thu, 20 Feb 2025 13:12:43 +0530 Subject: [PATCH 15/17] refactor(cypress): update connector_transaction_id validation for failed responses --- cypress-tests/cypress/support/commands.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/cypress-tests/cypress/support/commands.js b/cypress-tests/cypress/support/commands.js index fc25220b80b..ba633345ced 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" From 3576e72468ef9cd5b84d940890afa33598a6a78c Mon Sep 17 00:00:00 2001 From: "hyperswitch-bot[bot]" <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 07:44:38 +0000 Subject: [PATCH 16/17] chore(cypress): run formatter and address lints --- cypress-tests/cypress/support/commands.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cypress-tests/cypress/support/commands.js b/cypress-tests/cypress/support/commands.js index ba633345ced..defc54e9b29 100644 --- a/cypress-tests/cypress/support/commands.js +++ b/cypress-tests/cypress/support/commands.js @@ -2725,9 +2725,9 @@ Cypress.Commands.add( response.body.payment_method_id, "payment_method_id" ).to.include("pm_").and.to.not.be.null; - + if (response.body.status === "failed") { - expect ( + expect( response.body.connector_transaction_id, "connector_transaction_id" ).to.be.null; @@ -2737,7 +2737,7 @@ Cypress.Commands.add( "connector_transaction_id" ).to.not.be.null; } - + expect( response.body.payment_method_status, "payment_method_status" From a39b59ce75d86a197c9d7f69c49f8629856bb2f2 Mon Sep 17 00:00:00 2001 From: Arindam Sahoo Date: Mon, 24 Feb 2025 17:04:44 +0530 Subject: [PATCH 17/17] refactor(cypress): update response status to 400 for failed currency validation --- cypress-tests/cypress/e2e/configs/Payment/Fiuu.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js index ebce72ef365..9bcecf60570 100644 --- a/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js +++ b/cypress-tests/cypress/e2e/configs/Payment/Fiuu.js @@ -135,6 +135,7 @@ export const connectorDetails = { amount_to_capture: 6000, }, Response: { + status: 400, body: { status: "succeeded", amount: 6000, @@ -349,6 +350,7 @@ export const connectorDetails = { MITAutoCapture: { Request: {}, Response: { + status: 400, body: { status: "failed", error_code: "The currency not allow for the RecordType", @@ -575,6 +577,7 @@ export const connectorDetails = { setup_future_usage: "off_session", }, Response: { + status: 400, body: { status: "failed", error_message: "The currency not allow for the RecordType",