PHP API for Nordigen OpenBanking API. Work in progress!
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);
// Access account details.
$account= $nordigen->getDetails($account_id);
// Access account balances.
$balances = $nordigen->getBalances($account_id);
// Access account transactions.
$transactions = $nordigen->getTransactions($account_id);
// 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);
// List all available institutions
$nordigen->getInstitutions();
// Get details about a specific Institution
$nordigen->getInstitutions($institution_id);
// 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);
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
.