https://github.com/besrourms/tnrib-php
BBAN Checker Tunisia
https://github.com/besrourms/tnrib-php
php-library tunisia
Last synced: 3 months ago
JSON representation
BBAN Checker Tunisia
- Host: GitHub
- URL: https://github.com/besrourms/tnrib-php
- Owner: BesrourMS
- License: mit
- Created: 2023-06-03T12:57:28.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-14T16:25:41.000Z (over 1 year ago)
- Last Synced: 2023-12-14T17:44:27.277Z (over 1 year ago)
- Topics: php-library, tunisia
- Language: PHP
- Homepage: https://packagist.org/packages/besrourms/tnrib-php
- Size: 5.86 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TNRIB PHP
[](https://github.com/BesrourMS/tnrib-php/blob/main/LICENSE)BBAN Checker Tunisia, PHP implementation for [TNRIB.js](https://github.com/McZen-Technologies/TNRIB) (Vérificateur de RIB Tunisie)
The TNRIB PHP Package is a library for validating and retrieving information from Tunisian National Bank numbers. It provides a set of utility methods to validate BBAN numbers, extract IBAN, BIC, Account Number, and Bank Name associated with a valid BBAN.
## Installation
You can install the TNRIB PHP Package using Composer. Run the following command in your project directory:
```bash
composer require besrourms/tnrib-php
```## Usage
```php
include './vendor/autoload.php';
use besrourms\tnrib\TNRIB;
$tnrib = new TNRIB('07040005810111129653');
if ($tnrib->isValid()) {
echo 'IBAN: ' . $tnrib->iban() . '
';
echo 'BIC: ' . $tnrib->bic() . '
';
echo 'Account Number: ' . $tnrib->accountNumber() . '
';
echo 'Bank Name: ' . $tnrib->bankName() . '
';
} else {
echo 'Invalid BBAN';
}
```## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.