nordigen/nordigen-php
Composer 安装命令:
composer require nordigen/nordigen-php
包简介
Nordigen official API client for PHP
关键字:
README 文档
README
⚠️ Notice
Please be advised that the Bank Account Data libraries are no longer actively updated or maintained. While these libraries may still function, GoCardless will not provide further updates, bug fixes, or support for them.
This is official PHP client library for GoCardless Bank Account Data.
For a full list of endpoints and arguments, see the docs.
Before starting to use API you will need to create a new secret and get your SECRET_ID and SECRET_KEY from the Nordigen's Open Banking Portal.
Requirements
- PHP >= 7.4
Installation
Install library via composer:
composer require nordigen/nordigen-php
Example application
Laravel example application can be found in example directory
Quickstart
To use the library, use Composer's autoload:
require_once('vendor/autoload.php');
// Get secretId and secretKey from bankaccoutndata.gocardless.com portal and pass them to NordigenClient $secretId = "YOUR_SECRET_ID"; $secretKey = "YOUR_SECRET_KEY"; $client = new \Nordigen\NordigenPHP\API\NordigenClient($secretId, $secretKey); // Generate new access token. Token is valid for 24 hours // Token is automatically injected into every response $token = $client->createAccessToken(); // Get access token $accessToken = $client->getAccessToken(); // Get refresh token $refreshToken = $client->getRefreshToken(); // Exchange refresh token for new access token $newToken = $client->refreshAccessToken($refreshToken); // Get list of institutions by country. Country should be in ISO 3166 standard. $institutions = $client->institution->getInstitutionsByCountry("LV"); // Institution id can be gathered from getInstitutions response. // Example Revolut ID $institutionId = "REVOLUT_REVOGB21"; $redirectUri = "https://nordigen.com"; // Initialize new bank connection session $session = $client->initSession($institutionId, $redirectUri); // Get link to authorize in the bank // Authorize with your bank via this link, to gain access to account data $link = $session["link"]; // requisition id is needed to get accountId in the next step $requisitionId = $session["requisition_id"];
After successful authorization with a bank you can fetch your data (details, balances, transactions)
Fetching account metadata, balances, details and transactions
// Get account id after completed authorization with a bank $requisitionData = $client->requisition->getRequisition($requisitionId); // Get account id from the array of accounts $accountId = $requisitionData["accounts"][0]; // Instantiate account object $account = $client->account($accountId); // Fetch account metadata $metadata = $account->getAccountMetaData(); // Fetch account balances $balances = $account->getAccountBalances(); // Fetch account details $details = $account->getAccountDetails(); // Fetch account transactions $transactions = $account->getAccountTransactions(); // Optional. You can filter transactions by specific date range $transactions = $account->getAccountTransactions("2021-12-01", "2022-01-30"); // Get premium transactions // Optional parameters country, dateFrom, dateTo $premiumTransactions = $account->getPremiumAccountTransactions();
In order to use Premium endpoin please contact our bank-account-data-support@gocardless.com
Tests
./vendor/bin/phpunit
Support
For any inquiries please contact support at bank-account-data-support@gocardless.com or create an issue in the repository.
nordigen/nordigen-php 适用场景与选型建议
nordigen/nordigen-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 378.01k 次下载、GitHub Stars 达 42, 最近一次更新时间为 2022 年 04 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「psd2」 「Open Banking」 「nordigen」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 nordigen/nordigen-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nordigen/nordigen-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 nordigen/nordigen-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Netgen Open Graph Bundle is an Ibexa Platform bundle that allows simple integration with Open Graph protocol.
API client for banks supporting psd2 APIs.
A tool for scraping URL resources (oEmbed, OpenGraph, Twitter cards, JSON-LD)
A PSR-7 compatible library for making CRUD API endpoints
Nordigen official API client for PHP
Nordigen API client for PHP
统计信息
- 总下载量: 378.01k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 42
- 点击次数: 21
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-04-05