2017 © Pedro PelĂĄez
 

library bank-php

Easy-to-use library for getting Czech code or name of bank.

image

ondrakub/bank-php

Easy-to-use library for getting Czech code or name of bank.

  • Wednesday, August 26, 2015
  • by ondrakub
  • Repository
  • 1 Watchers
  • 1 Stars
  • 52 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 2 % Grown

The README.md

Bank for PHP

Total Downloads Build Status Latest Stable Version License, (*1)

Bank for PHP is a very small and easy-to-use library for works with bank account, (*2)

Install

via composer, (*3)

php composer.phar require ondrakub/bank-php

Usage

It is simple to use. Just call static methods Bank::getName($code) for getting name of bank and Bank::getCodes($name) for getting an array of codes of banks, (*4)

try {

    echo Bank::getName(3030);

} catch (BankException $e) {
    echo 'Error: '. $e->getMessage();
}


try {

    $codes = Bank::getCodes('bank');

    foreach ($codes as $key => $value) {
        echo $key . ' - '. $value . '<br>';
    }

} catch (BankException $e) {
    echo 'Error: '. $e->getMessage();
}

Or you can work with account number, (*5)

try {

    //accept xx-xx/xxxx, xx/xxxx, 00-xx/xxxx
    $bank = new Bank('1135595026/3030');

    echo 'account number: ' . $bank->getAccount() . '<br>';
    echo 'full account number: ' . $bank->getAccount(Bank::ZERO) . '<br>';
    echo 'prefix: ' . $bank->getPrefix() . '<br>';
    echo 'prefix with zero: ' . $bank->getPrefix(Bank::ZERO) . '<br>';
    echo 'number: ' . $bank->getNumber() . '<br>';
    echo 'number with zero: ' . $bank->getNumber(Bank::ZERO) . '<br>';
    echo 'code: ' . $bank->getCode() . '<br>';
    echo 'valid account: ' . $bank->isValid() . '<br>';
    echo 'IBAN: ' . $bank->getIban() . '<br>';
    echo 'formatted IBAN: ' . $bank->getIban(Bank::FORMATTED) . '<br>';
    echo 'BIC code (SWIFT): ' . $bank->getBic();

} catch (BankException $e) {
    echo 'Error: '. $e->getMessage();
}

The Versions

26/08 2015

dev-master

9999999-dev https://github.com/ondrakub/bank-php

Easy-to-use library for getting Czech code or name of bank.

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

  • php >=5.3

 

The Development Requires

code iban name number bank swift account bic valid

21/08 2015

v1.2

1.2.0.0 https://github.com/ondrakub/bank-php

Easy-to-use library for getting Czech code or name of bank.

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

  • php >=5.3

 

The Development Requires

code iban name number bank swift account bic valid

03/07 2014

v1.1.1

1.1.1.0 https://github.com/ondrakub/bank-php

Easy-to-use library for getting Czech code or name of bank.

  Sources   Download

BSD-3

code iban name number bank swift account bic valid

12/02 2014

v1.1

1.1.0.0 https://github.com/ondrakub/bank-php

Easy-to-use library for getting Czech code or name of bank.

  Sources   Download

BSD-3

code iban name number bank swift account bic valid

16/01 2014

v1.0

1.0.0.0 https://github.com/ondrakub/bank-php

Easy-to-use library for getting Czech code or name of bank.

  Sources   Download

BSD-3

code name bank