Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
test(cypress): add adyen bank redirect mandate CIT coverage (#12352)
HS-QUALIBOT1c41579b6905
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Adyen.js b/cypress-tests/cypress/e2e/configs/Payment/Adyen.jsindex 0f7819fc5e..5e78be1d40 100644--- a/cypress-tests/cypress/e2e/configs/Payment/Adyen.js+++ b/cypress-tests/cypress/e2e/configs/Payment/Adyen.js@@ -39,6 +39,38 @@ const singleUseMandateData = {},};+const mandateBrowserInfo = {+ user_agent:+ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",+ accept_header:+ "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",+ language: "nl-NL",+ color_depth: 24,+ screen_height: 723,+ screen_width: 1536,+ time_zone: 0,+ java_enabled: true,+ java_script_enabled: true,+ ip_address: "127.0.0.1",+};++const getMandateData = (currency) => ({+ customer_acceptance: {+ acceptance_type: "online",+ accepted_at: "2025-01-01T00:00:00.000Z",+ online: {+ ip_address: "127.0.0.1",+ user_agent: "Mozilla/5.0",+ },+ },+ mandate_type: {+ single_use: {+ amount: 6540,+ currency,+ },+ },+});+export const connectorDetails = {card_pm: {PaymentIntent: {@@ -1068,7 +1100,163 @@ export const connectorDetails = {},phone: {number: "9123456789",- country_code: "+91",+ country_code: "+31",+ },+ },+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ MandateSingleUseAutoCapture: {+ Request: {+ payment_method: "bank_redirect",+ payment_method_type: "ideal",+ payment_method_data: {+ bank_redirect: {+ ideal: {+ bank_name: "ing",+ },+ },+ },+ browser_info: mandateBrowserInfo,+ currency: "EUR",+ billing: {+ address: {+ line1: "1467",+ line2: "Harrison Street",+ line3: "Harrison Street",+ city: "San Fransico",+ state: "California",+ zip: "94122",+ country: "NL",+ first_name: "joseph",+ last_name: "Doe",+ },+ phone: {+ number: "9123456789",+ country_code: "+31",+ },+ },+ mandate_data: getMandateData("EUR"),+ payment_type: "new_mandate",+ setup_future_usage: "off_session",+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ },+ },+ BancontactCard: {+ Request: {+ payment_method: "bank_redirect",+ payment_method_type: "bancontact_card",+ payment_method_data: {+ bank_redirect: {+ bancontact_card: {+ card_number: "6703444444444449",+ card_exp_month: "03",+ card_exp_year: "2030",+ },+ },+ },+ currency: "EUR",+ billing: {+ address: {+ line1: "1 Main St",+ line2: "Apt 4",+ city: "Brussels",+ zip: "1000",+ country: "BE",+ first_name: "John",+ last_name: "Doe",+ },+ email: "[email protected]",+ phone: {+ number: "9123456789",+ country_code: "+32",+ },+ },+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ MandateSingleUseAutoCapture: {+ Request: {+ payment_method: "bank_redirect",+ payment_method_type: "bancontact_card",+ payment_method_data: {+ bank_redirect: {+ bancontact_card: {+ card_number: "6703444444444449",+ card_exp_month: "03",+ card_exp_year: "2030",+ },+ },+ },+ browser_info: mandateBrowserInfo,+ currency: "EUR",+ billing: {+ address: {+ line1: "1 Main St",+ line2: "Apt 4",+ city: "Brussels",+ zip: "1000",+ country: "BE",+ first_name: "John",+ last_name: "Doe",+ },+ email: "[email protected]",+ phone: {+ number: "9123456789",+ country_code: "+32",+ },+ },+ mandate_data: getMandateData("EUR"),+ payment_type: "new_mandate",+ setup_future_usage: "off_session",+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ },+ },+ OpenBankingUk: {+ Request: {+ payment_method: "bank_redirect",+ payment_method_type: "open_banking_uk",+ payment_method_data: {+ bank_redirect: {+ open_banking_uk: {+ issuer: "lloyds",+ },+ },+ },+ currency: "GBP",+ billing: {+ address: {+ line1: "1 Main St",+ city: "London",+ zip: "SW1A 1AA",+ country: "GB",+ first_name: "John",+ last_name: "Doe",+ },+ email: "[email protected]",+ phone: {+ number: "9123456789",+ country_code: "+44",},},},@@ -1078,6 +1266,125 @@ export const connectorDetails = {status: "requires_customer_action",},},+ MandateSingleUseAutoCapture: {+ Request: {+ payment_method: "bank_redirect",+ payment_method_type: "open_banking_uk",+ payment_method_data: {+ bank_redirect: {+ open_banking_uk: {+ issuer: "lloyds",+ },+ },+ },+ browser_info: mandateBrowserInfo,+ currency: "GBP",+ billing: {+ address: {+ line1: "1 Main St",+ city: "London",+ zip: "SW1A 1AA",+ country: "GB",+ first_name: "John",+ last_name: "Doe",+ },+ email: "[email protected]",+ phone: {+ number: "9123456789",+ country_code: "+44",+ },+ },+ mandate_data: getMandateData("GBP"),+ payment_type: "new_mandate",+ setup_future_usage: "off_session",+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ },+ },+ Trustly: {+ Request: {+ payment_method: "bank_redirect",+ payment_method_type: "trustly",+ payment_method_data: {+ bank_redirect: {+ trustly: {+ country: "SE",+ },+ },+ },+ currency: "EUR",+ billing: {+ address: {+ line1: "1 Main St",+ city: "Stockholm",+ zip: "11122",+ country: "SE",+ first_name: "John",+ last_name: "Doe",+ },+ email: "[email protected]",+ phone: {+ number: "9123456789",+ country_code: "+46",+ },+ },+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ Configs: {+ TRIGGER_SKIP: true,+ },+ MandateSingleUseAutoCapture: {+ Request: {+ payment_method: "bank_redirect",+ payment_method_type: "trustly",+ payment_method_data: {+ bank_redirect: {+ trustly: {+ country: "SE",+ },+ },+ },+ browser_info: mandateBrowserInfo,+ currency: "EUR",+ billing: {+ address: {+ line1: "1 Main St",+ city: "Stockholm",+ zip: "11122",+ country: "SE",+ first_name: "John",+ last_name: "Doe",+ },+ email: "[email protected]",+ phone: {+ number: "9123456789",+ country_code: "+46",+ },+ },+ mandate_data: getMandateData("EUR"),+ payment_type: "new_mandate",+ setup_future_usage: "off_session",+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ Configs: {+ TRIGGER_SKIP: true,+ },+ },},Eps: {Request: {diff --git a/cypress-tests/cypress/e2e/configs/Payment/Commons.js b/cypress-tests/cypress/e2e/configs/Payment/Commons.jsindex 46e8b9fdcc..44bfc9d9a6 100644--- a/cypress-tests/cypress/e2e/configs/Payment/Commons.js+++ b/cypress-tests/cypress/e2e/configs/Payment/Commons.js@@ -788,48 +788,100 @@ export const connectorDetails = {},},}),- Ideal: getCustomExchange({- Request: {- payment_method: "bank_redirect",- payment_method_type: "ideal",- payment_method_data: {- bank_redirect: {- ideal: {- bank_name: "ing",+ Ideal: {+ ...getCustomExchange({+ Request: {+ payment_method: "bank_redirect",+ payment_method_type: "ideal",+ payment_method_data: {+ bank_redirect: {+ ideal: {+ bank_name: "ing",+ country: "NL",+ },+ },+ },+ billing: {+ address: {+ line1: "1467",+ line2: "Harrison Street",+ line3: "Harrison Street",+ city: "San Fransico",+ state: "California",+ zip: "94122",country: "NL",+ first_name: "john",+ last_name: "doe",},},},- billing: {- address: {- line1: "1467",- line2: "Harrison Street",- line3: "Harrison Street",- city: "San Fransico",- state: "California",- zip: "94122",- country: "NL",- first_name: "john",- last_name: "doe",+ }),+ MandateSingleUseAutoCapture: getCustomExchange({+ Request: {},+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",},},- },- }),- OpenBankingUk: getCustomExchange({- Request: {- payment_method: "bank_redirect",- payment_method_type: "open_banking_uk",- payment_method_data: {- bank_redirect: {- open_banking_uk: {- issuer: "citi",- country: "GB",+ Configs: {+ TRIGGER_SKIP: true,+ },+ }),+ },+ BancontactCard: {+ ...getCustomExchange({+ Request: {+ payment_method: "bank_redirect",+ payment_method_type: "bancontact_card",+ payment_method_data: {+ bank_redirect: {+ bancontact_card: {+ card_number: "6703444444444449",+ card_exp_month: "03",+ card_exp_year: "2030",+ },},},+ billing: standardBillingAddress,},- billing: standardBillingAddress,- },- }),+ }),+ MandateSingleUseAutoCapture: getCustomExchange({+ Request: {},+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ }),+ },+ OpenBankingUk: {+ ...getCustomExchange({+ Request: {+ payment_method: "bank_redirect",+ payment_method_type: "open_banking_uk",+ payment_method_data: {+ bank_redirect: {+ open_banking_uk: {+ issuer: "citi",+ country: "GB",+ },+ },+ },+ billing: standardBillingAddress,+ },+ }),+ MandateSingleUseAutoCapture: getCustomExchange({+ Request: {},+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ }),+ },OnlineBankingFpx: getCustomExchange({Request: {payment_method: "bank_redirect",@@ -989,37 +1041,22 @@ export const connectorDetails = {},},}),- Trustly: getCustomExchange({- Configs: {- TRIGGER_SKIP: true,- },- Request: {- payment_method: "bank_redirect",- payment_method_type: "trustly",- payment_method_data: {- bank_redirect: {- trustly: {- country: "NL",- },- },- },- billing: standardBillingAddress,- },- }),- BancontactCard: {- MandateSingleUse: getCustomExchange({+ Trustly: {+ ...getCustomExchange({Configs: {TRIGGER_SKIP: true,},Request: {payment_method: "bank_redirect",- payment_method_type: "bancontact_card",- },- Response: {- status: 200,- body: {- status: "requires_customer_action",+ payment_method_type: "trustly",+ payment_method_data: {+ bank_redirect: {+ trustly: {+ country: "NL",+ },+ },},+ billing: standardBillingAddress,},}),},diff --git a/cypress-tests/cypress/e2e/configs/Payment/Stripe.js b/cypress-tests/cypress/e2e/configs/Payment/Stripe.jsindex 967be38c5d..c4dfbe8a7e 100644--- a/cypress-tests/cypress/e2e/configs/Payment/Stripe.js+++ b/cypress-tests/cypress/e2e/configs/Payment/Stripe.js@@ -1230,6 +1230,54 @@ export const connectorDetails = {},},},+ MandateSingleUseAutoCapture: {+ Request: {+ payment_method: "bank_redirect",+ payment_method_type: "bancontact_card",+ payment_method_data: {+ bank_redirect: {+ bancontact_card: {},+ },+ },+ billing: {+ email: "[email protected]",+ address: {+ line1: "1467",+ line2: "Harrison Street",+ line3: "Harrison Street",+ city: "San Fransico",+ state: "California",+ zip: "94122",+ country: "BE",+ first_name: "joseph",+ last_name: "Doe",+ },+ phone: {+ number: "9123456789",+ country_code: "+91",+ },+ },+ currency: "EUR",+ customer_acceptance: customerAcceptance,+ mandate_data: {+ customer_acceptance: customerAcceptance,+ mandate_type: {+ single_use: {+ amount: 8000,+ currency: "EUR",+ },+ },+ },+ setup_future_usage: "off_session",+ payment_type: "new_mandate",+ },+ Response: {+ status: 200,+ body: {+ status: "requires_customer_action",+ },+ },+ },},},pay_later_pm: {diff --git a/cypress-tests/cypress/e2e/configs/Payment/Utils.js b/cypress-tests/cypress/e2e/configs/Payment/Utils.jsindex d57925040c..a8008a4be0 100644--- a/cypress-tests/cypress/e2e/configs/Payment/Utils.js+++ b/cypress-tests/cypress/e2e/configs/Payment/Utils.js@@ -524,6 +524,8 @@ export const CONNECTOR_LISTS = {"stripe",],BANK_DEBIT: ["adyen", "novalnet", "payload"], // payload verified as working+ BANK_REDIRECT_BANCONTACT: ["adyen", "stripe"],+ BANK_REDIRECT_MANDATE: ["adyen"],BLUECODE_WALLET: ["calida"],ALIPAY_HK_WALLET: ["adyen"],PAYPAL_WALLET: ["novalnet", "paypal"],diff --git a/cypress-tests/cypress/e2e/spec/Payment/18-BankRedirect.cy.js b/cypress-tests/cypress/e2e/spec/Payment/18-BankRedirect.cy.jsindex 4b19860749..940523e4cf 100644--- a/cypress-tests/cypress/e2e/spec/Payment/18-BankRedirect.cy.js+++ b/cypress-tests/cypress/e2e/spec/Payment/18-BankRedirect.cy.js@@ -662,55 +662,224 @@ describe("Bank Redirect tests", () => {});context(- "BancontactCard - MandateSingleUse Create + Confirm flow test",+ "BancontactCard - MandateSingleUseAutoCapture Create + Confirm flow test",() => {let shouldContinue = true;+ before(function () {+ if (+ utils.shouldIncludeConnector(+ globalState.get("connectorId"),+ utils.CONNECTOR_LISTS.INCLUDE.BANK_REDIRECT_BANCONTACT+ )+ ) {+ this.skip();+ }+ });+beforeEach(function () {if (!shouldContinue) {this.skip();}});- it("Create Payment Intent", () => {- const data = getConnectorDetails(globalState.get("connectorId"))[- "bank_redirect_pm"- ]["PaymentIntent"]("BancontactCard");+ it("Create+Confirm BancontactCard mandate auto-capture", () => {+ let shouldContinueInner = true;++ cy.step("Create+Confirm payment with mandate", () => {+ const data = getConnectorDetails(globalState.get("connectorId"))[+ "bank_redirect_pm"+ ]["BancontactCard"]["MandateSingleUseAutoCapture"];+ cy.createConfirmPaymentTest(+ fixtures.createConfirmPaymentBody,+ data,+ "three_ds",+ "automatic",+ globalState+ );+ if (!utils.should_continue_further(data)) {+ shouldContinueInner = false;+ shouldContinue = false;+ }+ });++ cy.step("Retrieve Payment", () => {+ if (!shouldContinueInner) {+ cy.task("cli_log", "Skipping step: Retrieve Payment");+ return;+ }+ const data = getConnectorDetails(globalState.get("connectorId"))[+ "bank_redirect_pm"+ ]["BancontactCard"]["MandateSingleUseAutoCapture"];+ cy.retrievePaymentCallTest({ globalState, data });+ });+ });+ }+ );- cy.createPaymentIntentTest(- fixtures.createPaymentBody,- data,- "three_ds",- "automatic",- globalState- );+ describe("Bank Redirect Mandate CIT tests", () => {+ before(function () {+ if (+ utils.shouldIncludeConnector(+ globalState.get("connectorId"),+ utils.CONNECTOR_LISTS.INCLUDE.BANK_REDIRECT_MANDATE+ )+ ) {+ this.skip();+ }+ });- if (shouldContinue)- shouldContinue = utils.should_continue_further(data);+ context("iDEAL - MandateSingleUseAutoCapture CIT", () => {+ it("CIT mandate and retrieve", () => {+ let shouldContinue = true;++ cy.step("CIT for Mandate", () => {+ const data = getConnectorDetails(globalState.get("connectorId"))[+ "bank_redirect_pm"+ ]["Ideal"]["MandateSingleUseAutoCapture"];+ cy.citForMandatesCallTest(+ fixtures.citConfirmBody,+ data,+ 6540,+ true,+ "automatic",+ "new_mandate",+ globalState+ );+ if (!utils.should_continue_further(data)) {+ shouldContinue = false;+ }+ });++ cy.step("Retrieve Payment", () => {+ if (!shouldContinue) {+ cy.task("cli_log", "Skipping step: Retrieve Payment");+ return;+ }+ const data = getConnectorDetails(globalState.get("connectorId"))[+ "bank_redirect_pm"+ ]["Ideal"]["MandateSingleUseAutoCapture"];+ cy.retrievePaymentCallTest({ globalState, data });+ });++ cy.step("List Mandate", () => {+ if (!shouldContinue) {+ cy.task("cli_log", "Skipping step: List Mandate");+ return;+ }+ cy.listMandateCallTest(globalState);+ });++ cy.step("Revoke Mandate", () => {+ if (!shouldContinue) {+ cy.task("cli_log", "Skipping step: Revoke Mandate");+ return;+ }+ cy.revokeMandateCallTest(globalState);+ });});+ });- it("List Merchant Payment Methods", () => {- cy.paymentMethodsCallTest(globalState);+ context("OpenBankingUk - MandateSingleUseAutoCapture CIT", () => {+ it("CIT mandate and retrieve", () => {+ let shouldContinue = true;++ cy.step("CIT for Mandate", () => {+ const data = getConnectorDetails(globalState.get("connectorId"))[+ "bank_redirect_pm"+ ]["OpenBankingUk"]["MandateSingleUseAutoCapture"];+ cy.citForMandatesCallTest(+ fixtures.citConfirmBody,+ data,+ 6540,+ true,+ "automatic",+ "new_mandate",+ globalState+ );+ if (!utils.should_continue_further(data)) {+ shouldContinue = false;+ }+ });++ cy.step("Retrieve Payment", () => {+ if (!shouldContinue) {+ cy.task("cli_log", "Skipping step: Retrieve Payment");+ return;+ }+ const data = getConnectorDetails(globalState.get("connectorId"))[+ "bank_redirect_pm"+ ]["OpenBankingUk"]["MandateSingleUseAutoCapture"];+ cy.retrievePaymentCallTest({ globalState, data });+ });++ cy.step("List Mandate", () => {+ if (!shouldContinue) {+ cy.task("cli_log", "Skipping step: List Mandate");+ return;+ }+ cy.listMandateCallTest(globalState);+ });++ cy.step("Revoke Mandate", () => {+ if (!shouldContinue) {+ cy.task("cli_log", "Skipping step: Revoke Mandate");+ return;+ }+ cy.revokeMandateCallTest(globalState);+ });});+ });- it("Confirm BancontactCard mandate CIT", () => {- const data = getConnectorDetails(globalState.get("connectorId"))[- "bank_redirect_pm"- ]["BancontactCard"]["MandateSingleUse"];-- cy.citForMandatesCallTest(- fixtures.citConfirmBody,- data,- 8000,- true,- "automatic",- "new_mandate",- globalState- );-- if (shouldContinue)- shouldContinue = utils.should_continue_further(data);+ context("Trustly - MandateSingleUseAutoCapture CIT", () => {+ it("CIT mandate and retrieve", () => {+ let shouldContinue = true;++ cy.step("CIT for Mandate", () => {+ const data = getConnectorDetails(globalState.get("connectorId"))[+ "bank_redirect_pm"+ ]["Trustly"]["MandateSingleUseAutoCapture"];+ cy.citForMandatesCallTest(+ fixtures.citConfirmBody,+ data,+ 6540,+ true,+ "automatic",+ "new_mandate",+ globalState+ );+ if (!utils.should_continue_further(data)) {+ shouldContinue = false;+ }+ });++ cy.step("Retrieve Payment", () => {+ if (!shouldContinue) {+ cy.task("cli_log", "Skipping step: Retrieve Payment");+ return;+ }+ const data = getConnectorDetails(globalState.get("connectorId"))[+ "bank_redirect_pm"+ ]["Trustly"]["MandateSingleUseAutoCapture"];+ cy.retrievePaymentCallTest({ globalState, data });+ });++ cy.step("List Mandate", () => {+ if (!shouldContinue) {+ cy.task("cli_log", "Skipping step: List Mandate");+ return;+ }+ cy.listMandateCallTest(globalState);+ });++ cy.step("Revoke Mandate", () => {+ if (!shouldContinue) {+ cy.task("cli_log", "Skipping step: Revoke Mandate");+ return;+ }+ cy.revokeMandateCallTest(globalState);+ });});- }- );+ });+ });});diff --git a/cypress-tests/cypress/support/commands.js b/cypress-tests/cypress/support/commands.jsindex e1294fa9e1..e1558d4d29 100644--- a/cypress-tests/cypress/support/commands.js+++ b/cypress-tests/cypress/support/commands.js@@ -3366,6 +3366,12 @@ Cypress.Commands.add(if (response.status === 200) {globalState.set("paymentAmount", createConfirmPaymentBody.amount);globalState.set("paymentID", response.body.payment_id);+ if (response.body.mandate_id) {+ globalState.set("mandateId", response.body.mandate_id);+ }+ if (response.body.payment_method_id) {+ globalState.set("paymentMethodId", response.body.payment_method_id);+ }// Store the actual setup_future_usage value from the responseglobalState.set("actualSetupFutureUsage",@@ -4131,7 +4137,16 @@ Cypress.Commands.add(Response: resData,} = data || {};- const configInfo = execConfig(validateConfig(configs));+ const validatedConfigs = validateConfig(configs);+ if (validatedConfigs?.TRIGGER_SKIP) {+ cy.task(+ "cli_log",+ "TRIGGER_SKIP enabled, skipping citForMandatesCallTest"+ );+ return;+ }++ const configInfo = execConfig(validatedConfigs);const profile_id = globalState.get(`${configInfo.profilePrefix}Id`);const merchant_connector_id = globalState.get(`${configInfo.merchantConnectorPrefix}Id`@@ -4208,27 +4223,31 @@ Cypress.Commands.add(if (response.body.capture_method === "automatic") {expect(response.body).to.have.property("mandate_id");if (response.body.authentication_type === "three_ds") {- let nextActionUrl = null;- if (response.body.next_action.type === "invoke_ddc") {- expect(response.body.next_action)- .to.have.property("type")- .to.equal("invoke_ddc");- nextActionUrl = response.body.next_action.ddc_data.iframe_url;- globalState.set(- "nextActionUrl",- response.body.next_action.ddc_data.iframe_url- );- } else {- expect(response.body)- .to.have.property("next_action")- .to.have.property("redirect_to_url");- nextActionUrl = response.body.next_action.redirect_to_url;- globalState.set(- "nextActionUrl",- response.body.next_action.redirect_to_url- );+ if (response.body.status !== "succeeded") {+ let nextActionUrl = null;+ if (response.body.next_action.type === "invoke_ddc") {+ expect(response.body.next_action)+ .to.have.property("type")+ .to.equal("invoke_ddc");+ nextActionUrl = response.body.next_action.ddc_data.iframe_url;+ globalState.set(+ "nextActionUrl",+ response.body.next_action.ddc_data.iframe_url+ );+ } else {+ expect(response.body)+ .to.have.property("next_action")+ .to.have.property("redirect_to_url");+ nextActionUrl = response.body.next_action.redirect_to_url;+ globalState.set(+ "nextActionUrl",+ response.body.next_action.redirect_to_url+ );+ }+ cy.log(nextActionUrl);}- cy.log(nextActionUrl);+ // Response body key comparison runs for all three_ds paths, including succeeded status+ // — the redirect URL is extracted above when status !== succeeded, but all response keys are verified herefor (const key in resData.body) {expect(resData.body[key], [key]).to.deep.equal(response.body[key]@@ -4259,27 +4278,31 @@ Cypress.Commands.add(}} else if (response.body.capture_method === "manual") {if (response.body.authentication_type === "three_ds") {- let nextActionUrl = null;- if (response.body.next_action.type === "invoke_ddc") {- expect(response.body.next_action)- .to.have.property("type")- .to.equal("invoke_ddc");- nextActionUrl = response.body.next_action.ddc_data.iframe_url;- globalState.set(- "nextActionUrl",- response.body.next_action.ddc_data.iframe_url- );- } else {- expect(response.body)- .to.have.property("next_action")- .to.have.property("redirect_to_url");- nextActionUrl = response.body.next_action.redirect_to_url;- globalState.set(- "nextActionUrl",- response.body.next_action.redirect_to_url- );+ if (response.body.status !== "succeeded") {+ let nextActionUrl = null;+ if (response.body.next_action.type === "invoke_ddc") {+ expect(response.body.next_action)+ .to.have.property("type")+ .to.equal("invoke_ddc");+ nextActionUrl = response.body.next_action.ddc_data.iframe_url;+ globalState.set(+ "nextActionUrl",+ response.body.next_action.ddc_data.iframe_url+ );+ } else {+ expect(response.body)+ .to.have.property("next_action")+ .to.have.property("redirect_to_url");+ nextActionUrl = response.body.next_action.redirect_to_url;+ globalState.set(+ "nextActionUrl",+ response.body.next_action.redirect_to_url+ );+ }+ cy.log(nextActionUrl);}- cy.log(nextActionUrl);+ // Response body key comparison runs for all three_ds paths, including succeeded status+ // — the redirect URL is extracted above when status !== succeeded, but all response keys are verified herefor (const key in resData.body) {expect(resData.body[key], [key]).to.deep.equal(response.body[key]diff --git a/cypress-tests/cypress/support/redirectionHandler.js b/cypress-tests/cypress/support/redirectionHandler.jsindex bf0e95e469..bfa798ca5e 100644--- a/cypress-tests/cypress/support/redirectionHandler.js+++ b/cypress-tests/cypress/support/redirectionHandler.js@@ -702,6 +702,14 @@ function bankRedirectRedirection(cy.url().should("include", "paysafecard");verifyUrl = false;break;+ case "open_banking_uk":+ cy.get("body", { timeout: constants.TIMEOUT }).should("exist");+ cy.url().should("include", "adyen");+ cy.log(+ "Adyen OpenBankingUk redirect page loaded - sandbox error page, skipping interaction"+ );+ verifyUrl = false;+ break;// The 'ideal' case is handled outside handleFlowdefault:throw new Error(