ibanapi / api
官方php包,用于ibanapi.com集成
1.0.0
2021-09-08 18:47 UTC
This package is not auto-updated.
Last update: 2024-09-14 20:35:43 UTC
README
官方Node包,使用ibanapi.com公开API验证IBAN(适用于PHP)
此模块提供验证IBAN(完整和基本验证)的方法,其中完整验证将返回银行信息以及基本验证。
如何使用
-
从ibanapi.com网站获取API密钥。
-
使用以下命令安装包
composer require ibanapi/api
-
现在您可以初始化并使用该包,如下所示
-
完整IBAN验证
include "src/Api.php"; //Get all the IBAN Information $ibanApi = new IbanApi\Api("API_KEY"); $result = $ibanApi->validateIBAN("EE471000001020145685"); print_r(json_decode($result,true));
- 基本IBAN验证
include "src/Api.php"; //Get all the basic IBAN Information $ibanApi = new IbanApi\Api("API_KEY"); $result = $ibanApi->validateIBANBasic("EE471000001020145685"); print_r(json_decode($result,true));
- 获取余额
include "src/Api.php"; //Get the account balance $ibanApi = new IbanApi\Api("API_KEY"); $result = $ibanApi->getBalance(); print_r(json_decode($result,true));
Laravel
此包兼容PSR4,您可以在Laravel中轻松加载它,只需按上述示例安装composer包,并直接使用代码,无需包含行。
问题或建议
请随时为此仓库打开错误报告或提交拉取请求。
或访问iban API网站