Use of Nordigen Bank API

For reference, this is the line in question. However I don’t know enough about PHP to troubleshoot this.

return [
            'id' => $nordigen_account->metadata["id"],
            'account_type' => "bank",
-->         'account_name' => $nordigen_account->data["iban"],**
            'account_status' => $nordigen_account->metadata["status"],
            'account_number' => '**** ' . substr($nordigen_account->data["iban"], -7),
            'provider_account_id' => $nordigen_account->metadata["id"],
            'provider_id' => $nordigen_account->institution["id"],
            'provider_name' => $nordigen_account->institution["name"],
            'nickname' => isset($nordigen_account->data["ownerName"]) ? $nordigen_account->data["ownerName"] : '',
            'current_balance' => (float) $used_balance ? $used_balance["balanceAmount"]["amount"] : 0,
            'account_currency' => $used_balance ? $used_balance["balanceAmount"]["currency"] : '',
        ];

Yes, indeed. I’ve looked into this somewhat and have submitted a PR (though it is my first PR for InvoiceNinja): Nordigen API fix: iban should be treated as optional by kevinpetit · Pull Request #9289 · invoiceninja/invoiceninja · GitHub
You can try and see if my fix works for you, but make a DB backup before you do just to be safe.

Note: my fix has been added to the new release, v5.8.24. If you install this, this should fix this issue.

2 Likes

Congrats on your first PR, thanks for your help!

2 Likes

Thanks, I’ll do my best not to make it my last one :slight_smile:

2 Likes

Seems to work fine now, thanks to you two!

2 Likes

I’m trying to add an account via the Nordigen API. I’ve added the keys to my env but get a 404 error when clicking connect.

Any ideas where to start troubleshooting?

Please create a new post and we’ll try to help