Skip to content

Unofficial Laravel library to integrate Nordigen inside our application and easily get details through User.

License

Notifications You must be signed in to change notification settings

hypnodev/laravel-nordigen

Repository files navigation

Latest Version on Packagist Total Downloads

Unofficial Laravel library to integrate Nordigen inside our application and easily get details through User. banner

Installation

Via Composer

$ composer require hypnodev/laravel-nordigen

Publish the configuration with command:

$ php artisan vendor:publish --provider="Hypnodev\LaravelNordigen\LaravelNordigenServiceProvider" 

Add these keys in your .env:

NORDIGEN_SECRET_ID=
NORDIGEN_SECRET_KEY=

LARAVEL_NORDIGEN_SUCCESS_URI="/"

If you don't have yet credentials for Nordigen API, please refer to User Secrets | Open Banking Portal | Nordigen

Usage

Add HasNordigen trait to your User model

<?php

namespace App\Models;

use Hypnodev\LaravelNordigen\Traits\HasNordigen;
// ...

class User extends Authenticatable
{
    use Notifiable, HasNordigen;
    
    // ...
}

This will add nordigenRequisition, createRequisitionUrl, nordigenAccounts, nordigenAccountto your user.

Then you can create (and obtain link) requisition for bank (institution) with method:

<?php
auth()->user()->createRequisitionUrl('REVOLUT_REVOGB21');

and obtain accounts (wallet) information with these methods:

$accounts = $user->nordigenAccounts();
$account = $user->nordigenAccount($accounts[0]);
dd($account);

nordigenAccounts() accepts a requisition reference as optional parameter to get specified accounts for a certain bank otherwise it will take accounts for the first requisition available for this user.

Change log

Please see the changelog for more information on what has changed recently.

Security

If you discover any security related issues, please email me@cristiancosenza.com instead of using the issue tracker.

Credits

License

Please see the license file for more information.

About

Unofficial Laravel library to integrate Nordigen inside our application and easily get details through User.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages