Comments (6)
Please provide a demonstration script including:
- Source IBAN
- Function called
- Anticipated output
- Observed output
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require(__DIR__ . '/vendor/autoload.php');
}
$iban = "MT84MALT011000012345MTLCAST001S";
echo "IBAN: ".$iban."<br>";
$blz = iban_get_bank_part($iban);
echo "BLZ: ".$blz."<br>";
echo "Expected result: 01100<br>";
echo "Result with current registry.txt: MALT<br>";
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require(__DIR__ . '/vendor/autoload.php');
}
$iban = "GB95REVO00996906751878";
echo "IBAN: ".$iban."<br>";
$blz = iban_get_bank_part($iban);
echo "BLZ: ".$blz."<br>";
echo "Expected result: 009969<br>";
echo "Result with current registry.txt: REVO<br>";
As I just saw, LT is working with the current offsets.
from php-iban.
These values are already correctly defined in the registry. Are you sure it's the bankID offsets?
from php-iban.
I´m sure, because in the registry, for example malta, it is start 0 and end 3. But bban bank id is starting later:
MT84MALT011000012345MTLCAST001S
Same for LT and GB.
The webservice iban-rechner.de also results in this.
from php-iban.
Please provide a demonstration script including:
- Source IBAN
- Function called
- Anticipated output
- Observed output
from php-iban.
Thanks @cybercopsn, that's getting clearer. Would you be willing to submit a pull request with corrected values? I am extremely busy. Thanks.
from php-iban.
Not a bug. It appears you are looking for the branch part, not the bank part.
<?php
require_once('php-iban.php');
$iban = "MT84MALT011000012345MTLCAST001S";
echo "IBAN: ".$iban."\n";
print "Is valid? ";
if(verify_iban($iban)) { print "Valid.\n"; } else { print "Invalid.\n"; }
$blz = iban_get_bank_part($iban);
echo "Bank part: ".$blz."\n";
$branch = iban_get_branch_part($iban);
print "Branch part: " . $branch . "\n";
echo "Expected result: 01100\n";
print "----------------------\n";
$iban = "GB95REVO00996906751878";
echo "IBAN: ".$iban."\n";
print "Is valid? ";
if(verify_iban($iban)) { print "Valid.\n"; } else { print "Invalid.\n"; }
$blz = iban_get_bank_part($iban);
echo "Bank part: ".$blz."\n";
$branch = iban_get_branch_part($iban);
print "Branch part: " . $branch . "\n";
echo "Expected result: 009969\n";
?>
Output:
IBAN: MT84MALT011000012345MTLCAST001S
Is valid? Valid.
Bank part: MALT
Branch part: 01100
Expected result: 01100
----------------------
IBAN: GB95REVO00996906751878
Is valid? Valid.
Bank part: REVO
Branch part: 009969
Expected result: 009969
from php-iban.
Related Issues (20)
- Breaking namespace issue HOT 2
- IBAN secret or not HOT 1
- Strangeness on registry.txt in Timor-Leste HOT 3
- 2.8.x is not compatible HOT 12
- Version 3.0 mentioned in README.md but 2.8.0 is the last one available via composer (at the packageist.org) HOT 7
- compatible with php 7.4 HOT 2
- Missing dot for version 3.0.3 (released as 3.03) HOT 2
- docs/COMEDY-OF-ERRORS: IBAN registry moved again HOT 2
- How to use php-iban?
- PHP 7.4 - Exception message: Warning: array_key_exists() expects parameter 2 to be array HOT 1
- Check for EU/EFTA/Other Countries HOT 2
- Does it really generate IBAN? HOT 1
- Add PHP 8.0 support
- Irland IBAN not working correctly HOT 3
- PHP 8.2 compatibility HOT 1
- CZ IBAN incorect verify_iban HOT 3
- IBAN validation fails incorrectly HOT 1
- PHP array registry would be more efficient HOT 4
- Add a method to obfuscate IBAN for presentation for relative identification HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-iban.