Merge pull request #9289 from kevinpetit/v5-develop

Nordigen API fix: iban should be treated as optional
This commit is contained in:
David Bomba 2024-02-13 14:17:10 +11:00 committed by GitHub
commit 8cd530cb8c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -104,9 +104,9 @@ class AccountTransformer implements AccountTransformerInterface
return [ return [
'id' => $nordigen_account->metadata["id"], 'id' => $nordigen_account->metadata["id"],
'account_type' => "bank", 'account_type' => "bank",
'account_name' => $nordigen_account->data["iban"], 'account_name' => isset($nordigen_account->data["iban"]) ? $nordigen_account->data["iban"] : '',
'account_status' => $nordigen_account->metadata["status"], 'account_status' => $nordigen_account->metadata["status"],
'account_number' => '**** ' . substr($nordigen_account->data["iban"], -7), 'account_number' => isset($nordigen_account->data["iban"]) ? '**** ' . substr($nordigen_account->data["iban"], -7) : '',
'provider_account_id' => $nordigen_account->metadata["id"], 'provider_account_id' => $nordigen_account->metadata["id"],
'provider_id' => $nordigen_account->institution["id"], 'provider_id' => $nordigen_account->institution["id"],
'provider_name' => $nordigen_account->institution["name"], 'provider_name' => $nordigen_account->institution["name"],