globalcitizen / php-iban Goto Github PK
View Code? Open in Web Editor NEWGenerate, parse, validate, error-correct and present IBAN (and IIBAN) bank account information in PHP.
License: GNU Lesser General Public License v3.0
Generate, parse, validate, error-correct and present IBAN (and IIBAN) bank account information in PHP.
License: GNU Lesser General Public License v3.0
Thank you for this useful library. Please consider to publish the version
number somewhere in code or in documentation files. It would be helpful for
integrators using/implementing library managers.
Original issue reported on code.google.com by [email protected]
on 18 Mar 2013 at 2:47
For example, the new field's value for FO
(Faroe Islands) record would be DK
in order to identify Denmark (DK) as the relevant parent registrar.
This would be useful at this point primarily for two reasons:
FR
as their in country identifier practice. Such a field would allow for the intelligent fallback to the ascendant parent registrar's country code in cases where, for example, real world IBAN generation from domestic BBAN data was used for systems integration and the parent territory's country code was preferred.What steps will reproduce the problem?
1. set country_sepa to 1 for 'HR'
What is the expected output? What do you see instead?
iban_country_is_sepa returns false for croatia, should return true
What version of the product are you using? On what operating system?
1.4.3 OS independent
Please provide any additional information below.
keep up the good work ;)
Original issue reported on code.google.com by [email protected]
on 9 Jan 2014 at 1:31
For forward-looking records published prior to the date in which they take effect, this information should be included and possible to query. Historical date-of-effect information may also be of interest.
If http://www.swift.com/dsp/resources/documents/IBAN_Registry.txt is the correct URL it has changed format. '|' is not the delimiter any more, it seems to be tab ("\t") now. Furthermore the order of the fields has changed and possibly the content, too.
make the variables
Original issue reported on code.google.com by [email protected]
on 27 Aug 2013 at 7:06
Attachments:
When a completely random string is inputted (not starting with a country code),
a php error is generated in the function:
function _iban_country_get_info($country,$code) {
global $_iban_registry;
return $_iban_registry[strtoupper($country)][strtolower($code)];
}
a simple array_key_exists prevents the error:
function _iban_country_get_info($country,$code) {
global $_iban_registry;
if(array_key_exists(strtoupper($country), $_iban_registry))
{
return $_iban_registry[strtoupper($country)][strtolower($code)];
}
return false;
}
This might be something to implemen, ofcourse unless there's a reason why it's
not at this point
Very nice validator!
Original issue reported on code.google.com by [email protected]
on 29 Jun 2011 at 8:56
Here it is:
PT|Portugal|0002.0123.12345678901.54|000201231234567890154|4!n4!n11!n2!n|^
(\d{4})(\d{4})(\d{11})(\d{2})$|21|PT50000201231234567890154|PT2!n4!n4!n11!
n2!n|^PT(\d{2})(\d{4})(\d{4})(\d{11})(\d{2})$|25|0|3|4|7|2009-04-13
Original issue reported on code.google.com by [email protected]
on 6 May 2009 at 5:04
What steps will reproduce the problem?
1. Call the verify_iban function() with certain IBANs, e.g.,
CH0209000000405529562
What is the expected output? What do you see instead?
I expect it to say that the IBAN is valid, which it is (see
http://www.ibancalculator.com/iban_validieren.html?tx_valIBAN_pi1%5Biban%5D=CH02
09000000405529562&tx_valIBAN_pi1%5Bfi%5D=fi&no_cache=1&Action=validate+IBAN).
Instead it returns false.
If I comment out line 139 (basically disabling gmp_mod functionality and
reverting to the 'old method') it returns true again (as it did in a
pre-gmp_mod version of php-iban).
What version of the product are you using? On what operating system?
I'm using php-iban 1.3.7 on CentOS 5.8 running php 5.4.11
Please provide any additional information below.
N/A
Original issue reported on code.google.com by [email protected]
on 15 Feb 2013 at 4:37
Finnish record suggests position at which to pad domestic account numbers in order to reach a BBAN / IBAN, this data could be of some use for certain applications and would be nice to include for people migrating or making sense of legacy data.
There may be some German info over at https://github.com/Bigfoot0485/IBAN too.
What steps will reproduce the problem?
1. verify_iban('FI21 1234-5600 0007?85');
What is the expected output? What do you see instead?
Expect false. Got true.
What version of the product are you using? On what operating system?
1.4.3
Please provide any additional information below.
Is this a feature, as iban_to_machine_format seems to filter that sort of
things out?
Original issue reported on code.google.com by [email protected]
on 11 Sep 2013 at 11:58
In the old SVN structure there was tags.
Please provide any additional information below.
Is there any update of the registry for the following countries :
GP = GUADALOUOPE
GG = GUERNSEY
IM = ISLE OF MAN
JE = JERSEY
KZ = KAZAKISTAN
KW = KUWAIT
LB = LEBANON
MQ = MARTINIQUE
RE = REUNION
Many thanks for your kind attention
Original issue reported on code.google.com by [email protected]
on 8 Jun 2011 at 1:06
If we can find any evidence people use something more complex than simple XXXX XXXX XXXX XXXX XX or breaking down an IBAN in to smaller units with spaces based upon its legacy components (bank id, branch id if present, account number), then we should include it. Right now I have no evidence.
Consider adding a library of localised forms and abbreviations for account number portions, for example Austria and Germany seem to have 'Kontonummer' (KTO) for account number, and 'Bankleitzah' (BLZ) for bank identifier. This could assist greatly with deployments requiring international and/or constrained input.
variable
Original issue reported on code.google.com by [email protected]
on 18 Jan 2014 at 6:50
Attachments:
Finland's IBAN length should be 18 instead of 40 (in registry.txt)
Original issue reported on code.google.com by [email protected]
on 6 May 2009 at 5:04
the used algorithm is horribly slow :(
if the iban is converted to the number-only version ($pruefsumme), use one of
these:
---------------------------
$len = strlen($pruefsumme);
$rest = "";
$pos = 0;
while ($pos < $len) {
$ziffern = 9-strlen($rest);
$n = $rest . substr($pruefsumme,$pos,$ziffern);
$rest = $n % 97;
$pos = $pos + $ziffern;
}
$valid = $rest === 1;
--------------------------;
or in php 5:
$valid = gmp_intval(gmp_mod($pruefsumme,'97')) === 1;
greetings, Chris
Original issue reported on code.google.com by [email protected]
on 6 Feb 2013 at 3:55
The native php function split (used twice) is deprecated since php 5.3.0
explode looks like the aplicable alternative
Original issue reported on code.google.com by [email protected]
on 29 Jun 2011 at 8:58
Where known, these may be of use for reference purposes, particularly when building APIs that throw errors to users.
VERSION file appears to have been lost in migration.
What steps will reproduce the problem?
1. Download version 1.4.4 of the library in ZIP format
2. Open the 'VERSION' document (copy of this file from recent download
(2013-10-29) attached)
3. Note content reflect version 1.4.0, not 1.4.4
What is the expected output? What do you see instead?
Version number in the VERSION document should match current library version.
What version of the product are you using? On what operating system?
1.4.4. Issue is system-independent
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 29 Oct 2013 at 10:07
Attachments:
Hello,
first I just want to thank you very much for the great job!
Testing your class to verify / extract data from IBAN codes, I realized that to get the right Branch ID from a correct italian iban, in registry.txt, I had to change the 12th piece of the line (explode by '|' ) from 0 to 1 not to include the National Checksum single char at the beginning of the Branch ID.
This actually works and does not seem to break any other functionality, but I would appreciate you to confirm this is the right way to proceed.
Hello, I'm glad to see that the library is receiving support again.
I don't know if within the new features (or the future ones) is included a new function/method to get the country specific check digit.
In the case of Spain:
The format of the iban is: ESkk bbbb gggg xxcc cccc cccc
where:
k = IBAN control digit
b = National bank code
g = Branch code
x = Check digits
c = Account number
More here:
https://en.wikipedia.org/wiki/International_Bank_Account_Number#IBAN_formats_by_country
We could support the calculation of known national (BBAN-level) or bank-specific (sub-BBAN-level) checksums against algorithms where known. Please contribute if you know any.
would be nice if this cute lib would be available in composer, to make it
easier to use.
see
https://packagist.org/
http://getcomposer.org/
Original issue reported on code.google.com by [email protected]
on 2 Jul 2013 at 3:05
Have you think in release php-iban library as a Composer package?
It will make to other add your library to its projects without effort.
It is very easy to make it composer compatible, as simply as adding a json file
(with little configuration) and submiting an entry to packagist.
You can read more about composer in http://getcomposer.org
Original issue reported on code.google.com by [email protected]
on 14 Aug 2014 at 11:13
From v2.5.0 code comments:
Figure out a way to make code coverage analysis work with our built-in, non phpunit
based testing approach. At the time of writing, I'm unaware of an easy solution here.
What steps will reproduce the problem?
1.verify_iban('JO94CBJO0010000000000131000302')
What is the expected output? What do you see instead?
Should be valid IBAN (according to
http://www.ibancalculator.com/iban_validieren.html). Instead there is a warning
and IBAN is invalid:
Warning: preg_match(): Compilation failed: unmatched parentheses at offset 10
in /home/mbukovac/sassiecore/sassiehelpers/lib/php-iban-1.4.5/php-iban.php on
line 28
What version of the product are you using? On what operating system?
1.4.5 on Linux
Please provide any additional information below.
This is your sample IBAN for Jordan in registry.txt. I have a similar example
for Qatar (which I would prefer not to post here, but can email to you), which
is also valid, but throws the same preg_match error.
Thanks.
Original issue reported on code.google.com by [email protected]
on 3 Jun 2014 at 2:03
When reviewing my code changes, please focus on:
- Anything at all!
After the review, I'll merge this branch into:
/trunk
Original issue reported on code.google.com by [email protected]
on 4 Sep 2011 at 2:42
for example: DE12500105170648489890
registry.txt File must correct.
Original issue reported on code.google.com by [email protected]
on 28 Jan 2014 at 12:21
What steps will reproduce the problem?
iban_set_checksum('CH0009000000405241341')
What is the expected output? What do you see instead?
Expected IBAN: 'CH4709000000405241341'
Generated IBAN: 'CH9809000000405241341'
What version of the product are you using? On what operating system?
current stable
Please provide any additional information below.
iban_find_checksum calls iban_mod97_10 to get the correct "rest" number, but
this method generates true or false (which is correct when called from
iban_verify_checksum).
Original issue reported on code.google.com by [email protected]
on 22 Mar 2013 at 8:59
This patch fix issue 23 at least for 1.4.3 version.
Original issue reported on code.google.com by [email protected]
on 21 Jan 2014 at 11:40
Attachments:
registry.txt has incorrect information on the SEPA-status of France and
potentially others. The reason: IBAN_Registry.txt has a phrase like "Yes,
included GP, RE, MQ, GF, PM and YT" instead of a simple 'Yes' in that column
and thus the parser fails.
Otherwise, this is a very excellent library!!
What version of the product are you using? On what operating system?
1.4.0
Original issue reported on code.google.com by [email protected]
on 18 Jun 2013 at 12:10
You have an error in the registry file that is provided. It is on Finlands
config (FI). The error is that the lenght of the bban is set to 257 when it
should be 14.
Original issue reported on code.google.com by [email protected]
on 11 Feb 2011 at 12:12
Addition of special case national-level validations, eg. Estonia's record states that the first digit of the bank code cannot be 0, and Slovenia's five digit bank ID always begins with 91. At least one version of the German BLZ (bank IDs) database is available over here: https://github.com/Bigfoot0485/IBAN
The IBAN regular expression is missing for Ukraine IBAN accounts.
What steps will reproduce the problem?
var_export(iban_get_parts('NL91ABNA0417164300'));
What is the expected output?
array (
'country' => 'NL',
'checksum' => '91',
'bban' => 'ABNA0417164300',
'bank' => 'ABNA',
'branch' => '',
'account' => '0417164300',
);
What do you see instead?
array (
'country' => 'NL',
'checksum' => '91',
'bban' => 'ABNA0417164300',
'bank' => 'ABNA',
'branch' => '',
'account' => '',
);
What version of the product are you using? On what operating system?
version 1.4.0 on PHP 5.3.2 (Ubuntu)
Please provide any additional information below.
Possible solution:
update the NL line in registry.txt with bban_branchid_start_offset=4 and bban_branchid_stop_offset=3
Example NL line that is working for me:
NL|The Netherlands|041 71 64 300|ABNA0417164300|4!a10!n|^([A-Z]{4})(\d{10})$|14|NL91ABNA0417164300|NL2!n4!a10!n|^NL(\d{2})([A-Z]{4})(\d{10})$|18|0|3|4|3|2011-06-20|1
Original issue reported on code.google.com by [email protected]
on 31 May 2013 at 9:18
What steps will reproduce the problem?
Call iban_find_checksum() with an iban that has checksum below 10.
For example:
$num = iban_find_checksum('FI0512003000065276');
var_dump($num);
What is the expected output? What do you see instead?
expected: string(2) "05"
instead: int(5)
What version of the product are you using? On what operating system?
SVN revision 12
On Windows PHP 5.2.11
Please provide any additional information below.
This issue causes iban_set_checksum() to generate invalid IBAN numbers.
http://en.wikipedia.org/wiki/International_Bank_Account_Number#Generating_IBAN_c
heck_digits
7. Subtract the remainder from 98 and, if necessary, pad with a leading 0 to make a two digit number.
Can be fixed (for example) by changing line 100 from this:
return (98-$checksum);
to this:
return str_pad((98-$checksum), 2, '0', STR_PAD_LEFT);
Original issue reported on code.google.com by [email protected]
on 2 Nov 2010 at 7:21
It would seem useful to assist people with integrations by providing the IETF domain name system equivalent to each country record.
AA
(IIBAN) would have none.GB
(United Kingdom) would have uk
SM
(San Marino) would have sm
... etc.
What steps will reproduce the problem?
1. Zend_Loader::loadFile('php-iban.php', '/path/to/php-iban', TRUE);
What is the expected output? What do you see instead?
In php-iban.php at line 272 the file_get_contents() fails saying it can't
find registry.txt in include_path.
Solved changing line 272 in:
$data = file_get_contents(dirname(__FILE__) . '/registry.txt');
What version of the product are you using? On what operating system?
Various platform.
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 9 Feb 2010 at 12:32
As listed at https://en.wikipedia.org/wiki/International_Bank_Account_Number and pointed to elsewhere, there are quite a number of unofficial IBAN prefixes floating about that we should ideally integrate.
Issues observed include:
* Lack of an extended test library (input/output expectations)
* Lack of environment testing (eg. PHP gmp extension present/missing)
* No way to test subcomponents (such as differing MOD97 routines)
* No xdebug-style code coverage analysis for test library
Original issue reported on code.google.com by [email protected]
on 16 Feb 2013 at 1:12
Easy to fill fields, possibly useful.
A good list from the Italian central bank, and a better global list from BIS.
php-iban.php, function _iban_country_get_info, $code is double converted to
lower:
$code = strtolower($code);
if(array_key_exists($country,$_iban_registry)) {
if(array_key_exists($code,$_iban_registry[$country])) {
-- return $_iban_registry[$country][strtolower($code)];
++ return $_iban_registry[$country][$code];
}
Original issue reported on code.google.com by [email protected]
on 3 Oct 2012 at 1:24
I've noticed that in the file registry.txt some countries (e.g. Israel,
Albania) are missing. Would these countries be added?
Original issue reported on code.google.com by [email protected]
on 14 Dec 2010 at 9:28
Easy to fill field, definitely useful.
In file oophp-iban.php on line 47 the class search for " iban_find_checksun "
but doesn't exist, i've correct with " iban_find_checksum " and it's OK.
Version 1.1.0 file zip.
Sorry 4 my english, i'm italian.
Original issue reported on code.google.com by [email protected]
on 17 Aug 2011 at 9:29
It would be great if this library was published on https://packagist.org
If you need any support with that, I'd be happy to help, but it should be a
pretty straightforward process. Instructions can be found here:
https://packagist.org/about
Original issue reported on code.google.com by [email protected]
on 30 Jan 2014 at 7:17
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.