Re: Re: Validate_Finance_IBAN

From: Date: Thu, 18 Sep 2003 13:22:40 +0000
Subject: Re: Re: Validate_Finance_IBAN
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-21704@lists.php.net to get a copy of this message
On Thu, Sep 18, 2003 at 09:37:21AM +0200, Stefan Neufeind wrote: > (without build an object for this purpose but being able to use a > simple true / false out-of-the-box). This is also needed for the > Validate::multiple-part(). > > > > > - it validates bank branch control digit (in the middle of > > > > the IBAN). It uses then Validate::iban() for validating > > > > the main two control digits. > > > > > > Do you have official docs about this? I wanted to add bank-code- > > > checking for Germany myself and I sure further checks for other > > > > According to description of "IBAN per country": > > http://www.ecbs.org/tr201country.htm > > 1. Polish IBAN is derived from domestic account number (called NRB) > > and in this document there is bank-branch check digit algorithm > > given. In fact since 2004-01-01 each Polish bank account number has > > to be in IBAN form without PL in the beggining. > > You mean Poland completely changed their account numbers to all fit the IBAN scheme? It is one of the things Poland do to be closer to European standards. The transformation of bank account numbers has taken about 3 years - since 2001, ends in 2004 (old numbers could be accepted till 2004-06-30). > That's great news! Yes, after 1989 everything has changed here: phone numbers, communists street names, education (I was the last school year that learned obligatory Russian language), the whole economy was schoked. > But when you want to validate such a number you could just add "PL" Right. In Poland after 2003: [IBAN] PL+NRB == [IBAN] IBAN > > 2. Germany has complicated domestic account number (because IMHO > > german bank system is old and solid, while Polish banks were > > splitted from the National Bank of Poland after year 1989). > Are there any information about the official account numbers, bank > codes etc. for Poland? E.g. which characters they may contain, if > they follow certain algorithms (not just the IBAN-level-checksums but > maybe other algos also for each account number)? 1. There is a description of Polish account number system (but in Polish only) from ZBP (organization called Polish Bank Association): http://www.zbp.pl/doc/Karta%20wersja%202.0.pdf This document is based on Polish norms: PN ISO 13616:1998 (IBAN), PN ISO 7064:1998 (control char systems), PN-F-01102: 2002 - Numer Rachunku Bankowego (NRB) (i.e. domestic bank account number) These norms are not free, and I have not any of them, and I am not even sure that Polish norms are obligatory (I am not a lawer). 2. The regulation no. 5/2002 President of National Bank of Poland (regarding NRB and IBAN) seems to be obligatory for Polish banks. There is an English version of this document, that makes everything clear: http://www.nbp.pl/en/publikacje/Payment_system/reg_5_2002.pdf 3. The list of Polish main bank central numbers is available from the Polish national Bank: http://www.nbp.pl/en/banki/index.html and http://www.nbp.pl/asps/listabn.txt Each of the bank central can create several branches, but there is always control digit in the end of 8-digit number. Bank branch number system is described in the regulation 7/2002: http://www.nbp.pl/publikacje/system_platniczy/regulacje/zarzadzenie_07_2002.html (Polish only). The bank branch control digit algorithm is available only in Polish on page 15: http://www.nbp.pl/aktyprawne/dziennik/2002/dzu08_02.pdf I can translate the main points if needed. > Would you be able to have e.g. the > bank-code separated from the account? For internal use banks are allowed to use anything they want, but for external transfers, client information etc. there should be used only NRB (IBAN withoput PL) or IBAN. And according to regulation 5/2002 Polish account numbers consists only of digits (exactly 2+8+16 digits). I know other countries can use one or more letters inside. > Validate_PL_Finance_bankcode > but maybe we should tie the Finance-part together in one place, > right? Yes it should be Validate_Finance[something], maybe Validate_Finance_Bankcode Validate_Finance_Bankcode::check($num, 'PL') etc. > Piotr, could you maybe have a look at how a good implementation for > this could be done? But please keep in mind the following things: I will think about it. The problem is that bank branches e.g. in Poland are available at several places, with different formats (zipped csv etc.). Maybe in other countries there are other formats with no xml available. Then the driver should be flexible. > numbers to international numbers you would simply have to add PL for > Poland. Maybe everybody dealing with such numbers knows about this in > Poland? It's something Poland-specific, right? It seems it is Poland specific - introduced for ease of use for computers in banks. > Where could such information be integrated, what do you propose? It should be developper who should know how to use Validate_Finance_IBAN. The docs of the Validate_Finance_IBAN class could contain specific information for each of the countries. P.S. What is the bank account number system in USA? -- Piotr Klaban

« previous php.pear.dev (#21704) next »