GithubHelp home page GithubHelp logo

siedi / bav Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jschaedl/bav

0.0 2.0 0.0 2.02 MB

BAV is a Bank Account (Konto) Validator written in PHP. It provides classes which can be easily integrated into existing projects to validate german bank accounts. Its database is arbitrary, so you are independent on any DBS and may use a simple textfile.

PHP 100.00%

bav's Introduction

Bav

A small library for validating german bank account numbers. It provides classes which can be easily integrated into existing projects and is build for PHP 5.3+.

Build Status Latest Unstable Version Latest Unstable Version Total Downloads Dependencies Status

Installation

To install jschaedl/bav install Composer first, if you haven't already

curl -sS https://getcomposer.org/installer | php

Then just add the following to your composer.json file:

// composer.json
{
	"require": {
		"jschaedl/bav": "v1.0"
    }
}

Then, you can install the new dependencies by running Composer’s update command from the directory where your composer.json file is located:

# install
$ php composer.phar install
# update
$ php composer.phar update jschaedl/bav

# or you can simply execute composer command if you set it to
# your PATH environment variable
$ composer install
$ composer update jschaedl/bav

You can see this library on Packagist.

Composer installs autoloader at ./vendor/autoload.php. If you use jschaedl/bav in your php script, add:

require_once 'vendor/autoload.php';

Or you can use git clone command:

# HTTP
$ git clone https://github.com/jschaedl/Bav.git
# SSH
$ git clone [email protected]:jschaedl/Bav.git

Usage example

use Bav\Backend\Parser\BankDataParser;
use Bav\Backend\BankDataResolver;
use Bav\Encoder\EncoderFactory;

$bankDataFile = 'blz_2013_12_09_txt.txt';

$encoder = EncoderFactory::create(Bav::DEFAULT_ENCODING);

$parser = new BankDataParser($bankDataFile);
$parser->setEncoder($encoder);       

$bav = new Bav();
$bav->setBankDataResolver(new BankDataResolver($parser));

$bank = $bav->getBank('20090500');
$agency = $bank->getMainAgency();
$this->assertEquals('netbank', $agency->getName());
$this->assertEquals('000000', $agency->getIbanRule());

$bank = $bav->getBank('58561250');
$this->assertEquals('58564788', $bank->getBankId());

$bank = $bav->getBank('20090500');
$this->assertTrue($bank->isValid('1359100'));

How to contribute

If you want to fix some bugs or want to enhance some functionality, please fork the master branch and create your own development branch. Then fix the bug you found or add your enhancements and make a pull request. Please commit your changes in tiny steps and add a detailed description on every commit.

Unit Testing

All pull requests must be accompanied by passing unit tests. This repository uses phpunit and Composer. You must run composer install to install this package's dependencies before the unit tests will run. You can run the test via:

phpunit -c tests/phpunit.xml tests/

License and authors

This project is free and under GPL (see gpl.txt). So do what ever you want. But it would be nice to leave a note about the authors.

The authors of the original project who gave the idea to this project are Björn Wilmsmann and Markus Malkusch.

Responsible for this project is Jan Schädlich.

Requirements

You may have:

  • PHP 5.3.0 or greater
  • mbstring or iconv

BAV works with unicode encoding. Your PHP must have support compiled in to either the mb_* or the iconv_* functions. If these functions are missing BAV works only with the ISO-8859-15 encoding.

Bitdeli Badge

bav's People

Contributors

bitdeli-chef avatar jschaedl avatar malkusch avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.