2017 © Pedro Peláez
 

library bav

BAV provides validation for German Bank Accounts (Konto)

image

malkusch/bav

BAV provides validation for German Bank Accounts (Konto)

  • Sunday, July 5, 2015
  • by malkusch
  • Repository
  • 2 Watchers
  • 0 Stars
  • 15,851 Installations
  • PHP
  • 5 Dependents
  • 2 Suggesters
  • 2 Forks
  • 3 Open issues
  • 14 Versions
  • 0 % Grown

The README.md

About BAV

BAV (bank account validator) is a validation library for German bank accounts., (*1)

Installation

Use Composer:, (*2)

{
    "require": {
        "malkusch/bav": "^1"
    }
}

Configuration

You can use BAV out of the box. BAV comes with a ready to play default configuration (DefaultConfiguration):, (*3)

  • UTF-8 encoding (if supported), (*4)

  • FileDataBackendContainer. I.e. it uses binary search on the file from the Bundesbank. Note that this data backend uses the directory bav/data for install and update operations. You have to make sure that this directory is writable., (*5)

  • automatic installation. You don't have to call any installation script. The container will download the Bundesbank file upon the first execution., (*6)

  • update plan which triggers an E_USER_NOTICE if the Bundesbank file is outdated., (*7)

You can define your own configuration by calling ConfigurationRegistry::setConfiguration() or preferably creating the file bav/configuration.php which returns a Configuration object:, (*8)

namespace malkusch\bav;

$configuration = new DefaultConfiguration();

$pdo = new \PDO("mysql:host=localhost;dbname=test;charset=UTF8");
$configuration->setDataBackendContainer(new PDODataBackendContainer($pdo));

$configuration->setUpdatePlan(new AutomaticUpdatePlan());

return $configuration;

Update

The Bundesbank releases new files for March, June, September and December. BAV needs those new files. You have several possiblities to update bav:, (*9)

Script

Call bin/bav-update.php., (*10)

Programmatically

use malkusch\bav\BAV;

$bav = new BAV();
$bav->update();

Automatic

Enable automatic updates with AutomaticUpdatePlan in your bav/configuration.php:, (*11)

namespace malkusch\bav;

$configuration = new DefaultConfiguration();
$configuration->setUpdatePlan(new AutomaticUpdatePlan());

return $configuration;

This automatic update plan will perform long running update operations as a shutdown hook. I.e. it won't bother users during normal operations., (*12)

Usage

You can use BAV with the api facade BAV:, (*13)

An Agency object has the fields:, (*21)

Example

use malkusch\bav\BAV;

$bav = new BAV();
$bankID  = "10000000";
$account = "1234567890"

// check for a bank
var_dump(
    $bav->isValidBank($bankID)
);

// check for a bank account
var_dump(
    $bav->isValidBankAccount($bankID, $account)
);

// filter validation
var_dump(
    filter_var($bankID, FILTER_CALLBACK, $bav->getValidBankFilterCallback()),
    filter_var($account, FILTER_CALLBACK, $bav->getValidAccountFilterCallback())
);

// Get informations about a bank
$agency = $bav->getMainAgency($bankID);
echo "{$agency->getName()} {$agency->getCity()}\n";

See also bav/docs/example.php., (*28)

Optional Dependencies

You may have:, (*29)

  • CURL: If you provide bav/data/banklist.txt you don't need CURL., (*30)

  • mbstring: BAV works with unicode encoding. Your PHP must have support compiled in the mb_* functions. If these functions are missing BAV works only with the ISO-8859-15 encoding., (*31)

  • PDO: If you intend to use a DBS you need to use PDODataBackendContainer. PDODataBackendContainer needs a PDO support compiled in PHP., (*32)

  • doctrine/orm: You can use DoctrineBackendContainer which uses doctrine as data backend., (*33)

License and authors

This project is free and under the WTFPL. So do what ever you want. But it would be nice to leave a note about the authors., (*34)

The author of the original project which gave the idea to this project is Björn Wilmsmann. Responsable for this project is Markus Malkusch markus@malkusch.de., (*35)

Donations

If you like BAV and feel generous donate a few Bitcoins here: 1335STSwu9hST4vcMRppEPgENMHD2r1REK, (*36)

Build Status, (*37)

The Versions

05/07 2015

dev-php-7

dev-php-7 http://bav.malkusch.de/

BAV provides validation for German Bank Accounts (Konto)

  Sources   Download

WTFPL

The Requires

 

The Development Requires

validation check bank account bankaccount konto

05/07 2015

dev-master

9999999-dev http://bav.malkusch.de/

BAV provides validation for German Bank Accounts (Konto)

  Sources   Download

WTFPL

The Requires

 

The Development Requires

validation check bank account bankaccount konto

05/07 2015

1.2.0

1.2.0.0 http://bav.malkusch.de/

BAV provides validation for German Bank Accounts (Konto)

  Sources   Download

WTFPL

The Requires

 

The Development Requires

validation check bank account bankaccount konto

04/04 2015

1.1.0

1.1.0.0 http://bav.malkusch.de/

BAV provides validation for German Bank Accounts (Konto)

  Sources   Download

WTFPL

The Requires

 

The Development Requires

validation check bank account bankaccount konto

19/03 2015

1.0.4

1.0.4.0 http://bav.malkusch.de/

BAV provides validation for German Bank Accounts (Konto)

  Sources   Download

WTFPL-2.0

The Requires

 

The Development Requires

validation check bank account bankaccount konto

13/01 2015

dev-bav-0

dev-bav-0 http://bav.malkusch.de/

BAV provides validation for German Bank Accounts (Konto)

  Sources   Download

GPL-2.0

The Requires

  • php >=5

 

The Development Requires

validation check bank account bankaccount konto

13/01 2015

0.29.2

0.29.2.0 http://bav.malkusch.de/

BAV provides validation for German Bank Accounts (Konto)

  Sources   Download

GPL-2.0

The Requires

  • php >=5

 

The Development Requires

validation check bank account bankaccount konto

13/01 2015

1.0.3

1.0.3.0 http://bav.malkusch.de/

BAV provides validation for German Bank Accounts (Konto)

  Sources   Download

WTFPL-2.0

The Requires

 

The Development Requires

validation check bank account bankaccount konto

26/10 2014

0.29.1

0.29.1.0 http://bav.malkusch.de/

BAV provides validation for German Bank Accounts (Konto)

  Sources   Download

GPL-2.0

The Requires

  • php >=5

 

The Development Requires

validation check bank account bankaccount konto

26/10 2014

1.0.2

1.0.2.0 http://bav.malkusch.de/

BAV provides validation for German Bank Accounts (Konto)

  Sources   Download

WTFPL-2.0

The Requires

 

The Development Requires

validation check bank account bankaccount konto

11/10 2014

1.0.1

1.0.1.0 http://bav.malkusch.de/

BAV provides validation for German Bank Accounts (Konto)

  Sources   Download

WTFPL-2.0

The Requires

 

The Development Requires

validation check bank account bankaccount konto

25/06 2014

1.0.0

1.0.0.0 http://bav.malkusch.de/

BAV provides validation for German Bank Accounts (Konto)

  Sources   Download

GPL-2.0

The Requires

  • php >=5

 

The Development Requires

validation check bank account bankaccount konto

01/06 2014

0.29

0.29.0.0 http://bav.malkusch.de/

BAV provides validation for German Bank Accounts (Konto)

  Sources   Download

GPL-2.0

The Requires

  • php >=5

 

The Development Requires

validation check bank account bankaccount konto

26/05 2014

0.28

0.28.0.0 http://bav.malkusch.de/

BAV provides validation for German Bank Accounts (Konto)

  Sources   Download

GPL-2.0

The Requires

  • php >=5

 

The Development Requires

validation check bank account bankaccount konto