elliotsawyer/nzbanks
Composer 安装命令:
composer require elliotsawyer/nzbanks
包简介
Database of active New Zealand banks, maintained with a user task
README 文档
README
SilverStripe module for managing a dataset of active New Zealand banks. This also maintains a DataObject of what represents a New Zealand bank account number, including validation of these numbers. It also contains utility functions for converting between dollars and cents.
Installation
- add the repository to your composer.json. This is a private repo, so composer will not find it on packagist
composer require elliotsawyer/nzbanks- Run
vendor/bin/sake dev/build flush= - Populate the database with bank branches:
vendor/bin/sake dev/tasks/download-bank-register-information flush=. Do this on the CLI because it will likely exceed PHP's default execution time.
Configuration
Only the download URL can be changed. This is incredibly unlikely, but possible because PaymentsNZ has updated the URL more than once without notice.
CryptoPay\NZBanks\DownloadBankRegisterInformation: bank_register_source: https://payments.nz/path/to/register
Usage
//convert NZ Dollars to cents NZBankAccount::dollars_to_cents(1.234); //1234 //convert NZ cents into dollars NZBankAccount::cents_to_dollars(1234) //12.34 //identity the bank that issued an account. This is based on the first 6 digits and returns a Bank dataobject Bank::identify('12-3141-0000456-001') // ASB Bank, Willis Street (Bank dataobject) //display the account in a "normalised" format described by the IRD NZBankAccount::prettify('1-2-3-4') //0001-0002-00000003-0004 //display the account in a "normalised" format with a different delimiter NZBankAccount::prettify('1-2-3-4', ' ') //0001 0002 00000003 0004 NZBankAccount::prettify('1-2-3-4', '.') //0001.0002.00000003.0004
Bank accounts are validated according to an IRD checksum format. More information on this validation can be found here: https://www.ird.govt.nz/-/media/Project/IR/PDF/2020RWTNRWTSpecificationDocumentv10.pdf (see page 15, "Bank account number validation")
Copyright
© 2019 Elliot Sawyer, CryptoPay Limited. All rights reserved.
Support
Like my work? Consider shouting me a coffee or a small donation if this module helped you solve a problem. I accept cryptocurrency at the following addresses:
- Bitcoin: 12gSxkqVNr9QMLQMMJdWemBaRRNPghmS3p
- Bitcoin Cash: 1QETPtssFRM981TGjVg74uUX8kShcA44ni
- Litecoin: LbyhaTESx3uQvwwd9So4sGSpi4tTJLKBdz
elliotsawyer/nzbanks 适用场景与选型建议
elliotsawyer/nzbanks 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 26 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 01 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Bank」 「silverstripe」 「nz」 「new zealand」 「lookup」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 elliotsawyer/nzbanks 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 elliotsawyer/nzbanks 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 elliotsawyer/nzbanks 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Integrates New Relic with Zend Expressive
Symfony integration for Czech bank account library
Check for holidays - localeaware
Analytics chooser extensions for site settings.
PHP Library for New Relic Agent
统计信息
- 总下载量: 26
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2020-01-22