Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brocc-ab/se-bank-account-php
Swedish bank account details and validation for PHP
https://github.com/brocc-ab/se-bank-account-php
Last synced: 3 months ago
JSON representation
Swedish bank account details and validation for PHP
- Host: GitHub
- URL: https://github.com/brocc-ab/se-bank-account-php
- Owner: brocc-ab
- License: mit
- Created: 2020-09-21T14:30:35.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T11:43:56.000Z (11 months ago)
- Last Synced: 2024-07-07T12:43:36.506Z (4 months ago)
- Language: PHP
- Homepage:
- Size: 25.4 KB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-sweden - PHP
README
# Swedish Bank Account for PHP
[![Build Status](https://travis-ci.org/brocc-ab/se-bank-account-php.svg?branch=master)](https://travis-ci.org/brocc-ab/se-bank-account-php)
[![Latest Version](https://img.shields.io/github/release/brocc-ab/se-bank-account-php.svg?style=flat-square)](https://github.com/brocc-ab/se-bank-account-php/releases)
![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)This package easily validates and returns details about Swedish bank account numbers using PHP. The details and validation rules are based on the documentation provided by Bankgirot, which can be found [here](https://www.bankgirot.se/globalassets/dokument/anvandarmanualer/bankernaskontonummeruppbyggnad_anvandarmanual_sv.pdf).
## Installation
Installing the Swedish Bank Account for PHP can be done using Composer.
```bash
composer require brocc/se-bank-account
```## Usage
Usage is very straight forward, just create a new instance of `Brocc\SeBankAccount\Account` which takes a string or an integer as argument and returns the details about the given number such as clearing number, account number and the name of the bank (if valid).
```php
isValid(); // true// Returns the clearing number.
$account->clearing(); // 3300// Returns the account number excl. clearing number, null if not valid.
$account->number(); // 7505092556// Returns the name of the bank.
$account->bank(); // Nordea Personkonto
```If an account is not valid `$account->isValid()` will return `false` and the other methods will return `null`.
## Supported Banks
Following Swedish banks are currently supported:
* Aion Bank SA
* Avanza Bank
* BNP Paribas SA
* Bankgirot
* BlueStep Finans
* Citibank
* DNB Bank
* Danske Bank
* Ekobanken
* Erik Penser
* Forex Bank *(discontinued\*)*
* Handelsbanken
* IKANO Bank
* Ica Banken
* JAK Medlemsbank
* Klarna Bank
* Landshypotek
* Lunar Bank A/S
* Länsförsäkringar Bank
* Lån & Spar Bank Sverige
* Marginalen Bank
* MedMera Bank *(discontinued\*)*
* Multitude Bank plc
* Nordax Bank *(NOBA Bank Group\*\*)*
* Nordea
* Nordea Personkonto
* Nordea/Plusgirot
* Nordnet Bank
* Northmill Bank
* Resurs Bank
* Riksgälden
* SBAB
* SEB
* Santander Consumer Bank
* Skandiabanken
* Sparbanken Syd
* Svea Bank
* Swedbank
* Swedbank fd. Sparbanken Öresund
* Ålandsbanken Sverige AB\* Bank is currently not available in Bankgirot's documentation, available in package for backwards compatibility.\
\*\* Package will return Nordax Bank, even though the company name has changed to NOBA Bank Group.## Contributing
If you find a bug or a bank that might not be supported, please submit an issue on Github directly under [issues](https://github.com/brocc-ab/se-bank-account-php/issues).
Any contributions are welcome!