pemedina / nordigen-api
PHP Wrapper for Nordigen API.
dev-master
2022-03-21 19:53 UTC
Requires
- php: ^7.2 || ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^6.2.1|^7.0
Requires (Dev)
- phpunit/phpunit: ^8.0 || ^9.4
This package is auto-updated.
Last update: 2025-01-22 17:17:29 UTC
README
PHP API for Nordigen OpenBanking API. Work in progress!
Installation
Add the package as a dependency in your composer.json
file:
require { "pemedina/nordigen-api": "dev-master" }
Include the composer autoloader in your script. Set your nordigen API token and create an instance of the API.
require 'vendor/autoload.php'; use Pemedina/Nordigen; $nordigen = new Nordigen($secret_id, $secret_key);
Usage
Accounts
// Access account details. $account= $nordigen->getDetails($account_id); // Access account balances. $balances = $nordigen->getBalances($account_id); // Access account transactions. $transactions = $nordigen->getTransactions($account_id);
Agreements
// Retrieve all enduser agreements $agreements = $nordigen->getAgreements(); // Create enduser agreement $agreement = $nordigen->createAgreement( $attributes); // Retrieve enduser agreement by id $agreement = $nordigen->getAgreements($agreement_id); // Delete End User Agreement. $agreement = $nordigen->deleteAgreement($agreement_id); // Accept an end-user agreement via the API. $agreement = $nordigen->acceptAgreement($agreement_id);
Institutions
// List all available institutions $nordigen->getInstitutions(); // Get details about a specific Institution $nordigen->getInstitutions($institution_id);
Requisitions
// Retrieve all requisitions belonging to the company $nordigen->getRequisitions(); // Create new requisition $nordigen->createRequisition([]); // Retrieve all requisition by id $nordigen->getRequisition($requisition_id); // Delete Requisition and all End User Agreements. $nordigen->deleteRequisition($requisition_id);
Testing
Put SECRET_ID
and SECRET_KEY
in your environment. Or put the following in phpunit.xml
.
<php> <env name="SECRET_ID" value="secret_id"/> <env name="SECRET_KEY" value="secret_key"/> </php>
Run tests with phpunit (-v) tests
.