enable GoCardless account selection if supported by the target institution (#5031)

* Update gocardless-service.js

* Allow account selection during requisition based on institution support

* lint

* note

---------

Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>
This commit is contained in:
Valentin Lorenzen
2025-05-27 22:32:25 +02:00
committed by GitHub
parent 6e3a337945
commit 47ee6eeb51
2 changed files with 9 additions and 1 deletions

View File

@@ -313,6 +313,8 @@ export const goCardlessService = {
await goCardlessService.setToken();
const institution = await goCardlessService.getInstitution(institutionId);
const accountSelection =
institution.supported_features?.includes('account_selection') ?? false;
let response;
try {
@@ -329,7 +331,7 @@ export const goCardlessService = {
userLanguage: 'en',
ssn: null,
redirectImmediate: false,
accountSelection: false,
accountSelection,
});
} catch (error) {
handleGoCardlessError(error);

View File

@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [lorenzenv]
---
Enable GoCardless account selection if supported by the target institution