Nordigen API fix: iban should be treated as optional

This commit is contained in:
Kevin 2024-02-12 18:02:29 +01:00 committed by GitHub
parent 958e0bbfc6
commit 821f2b90b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -104,7 +104,7 @@ 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' => '**** ' . substr($nordigen_account->data["iban"], -7),
'provider_account_id' => $nordigen_account->metadata["id"], 'provider_account_id' => $nordigen_account->metadata["id"],