From c89b0c64070811d2bc4ac81293eb5df1373c3b46 Mon Sep 17 00:00:00 2001 From: likhinbopanna <131246334+likhinbopanna@users.noreply.github.com> Date: Thu, 4 Jul 2024 13:12:44 +0530 Subject: [PATCH] ci(cypress): Update card number for adyen and status for paypal (#5192) --- .../cypress/e2e/PaymentUtils/Adyen.js | 4 +- .../cypress/e2e/PaymentUtils/Paypal.js | 48 +++++++------------ 2 files changed, 19 insertions(+), 33 deletions(-) diff --git a/cypress-tests/cypress/e2e/PaymentUtils/Adyen.js b/cypress-tests/cypress/e2e/PaymentUtils/Adyen.js index 72090f91722..8513f596f4f 100644 --- a/cypress-tests/cypress/e2e/PaymentUtils/Adyen.js +++ b/cypress-tests/cypress/e2e/PaymentUtils/Adyen.js @@ -1,11 +1,11 @@ import { getCustomExchange } from "./Commons"; const successfulNo3DSCardDetails = { - card_number: "371449635398431", + card_number: "4111111111111111", card_exp_month: "03", card_exp_year: "30", card_holder_name: "John Doe", - card_cvc: "7373", + card_cvc: "737", }; const successfulThreeDSTestCardDetails = { diff --git a/cypress-tests/cypress/e2e/PaymentUtils/Paypal.js b/cypress-tests/cypress/e2e/PaymentUtils/Paypal.js index 1aa4bc9c1a9..7c109b98160 100644 --- a/cypress-tests/cypress/e2e/PaymentUtils/Paypal.js +++ b/cypress-tests/cypress/e2e/PaymentUtils/Paypal.js @@ -62,7 +62,7 @@ export const connectorDetails = { Response: { status: 200, body: { - status: "processing", + status: "succeeded", }, }, }, @@ -94,7 +94,7 @@ export const connectorDetails = { Response: { status: 200, body: { - status: "processing", + status: "succeeded", }, }, }, @@ -109,10 +109,10 @@ export const connectorDetails = { Response: { status: 200, body: { - status: "processing", + status: "succeeded", amount: 6500, - amount_capturable: 6500, - amount_received: 0, + amount_capturable: 0, + amount_received: 6500, }, }, }, @@ -121,10 +121,10 @@ export const connectorDetails = { Response: { status: 200, body: { - status: "processing", + status: "partially_captured", amount: 6500, - amount_capturable: 6500, - amount_received: 0, + amount_capturable: 0, + amount_received: 100, }, }, }, @@ -146,14 +146,9 @@ export const connectorDetails = { customer_acceptance: null, }, Response: { - status: 400, + status: 200, body: { - error: { - type: "invalid_request", - message: - "This Payment could not be refund because it has a status of processing. The expected state is succeeded, partially_captured", - code: "IR_14", - }, + status: "succeeded", }, }, }, @@ -166,14 +161,9 @@ export const connectorDetails = { customer_acceptance: null, }, Response: { - status: 400, + status: 200, body: { - error: { - type: "invalid_request", - message: - "This Payment could not be refund because it has a status of processing. The expected state is succeeded, partially_captured", - code: "IR_14", - }, + status: "succeeded", }, }, }, @@ -186,14 +176,9 @@ export const connectorDetails = { customer_acceptance: null, }, Response: { - status: 400, + status: 200, body: { - error: { - type: "invalid_request", - message: - "This Payment could not be refund because it has a status of processing. The expected state is succeeded, partially_captured", - code: "IR_14", - }, + status: "succeeded", }, }, }, @@ -228,7 +213,7 @@ export const connectorDetails = { Response: { status: 200, body: { - status: "processing", + status: "succeeded", }, }, }, @@ -338,7 +323,8 @@ export const connectorDetails = { Response: { status: 200, body: { - status: "requires_customer_action", + status: "failed", + error_code: "PERMISSION_DENIED", }, }, },