Coder Social home page Coder Social logo

Comments (6)

cybercopsn avatar cybercopsn commented on August 11, 2024 1

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.

Olympic1 avatar Olympic1 commented on August 11, 2024

These values are already correctly defined in the registry. Are you sure it's the bankID offsets?

from php-iban.

cybercopsn avatar cybercopsn commented on August 11, 2024

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.

globalcitizen avatar globalcitizen commented on August 11, 2024

Please provide a demonstration script including:

  • Source IBAN
  • Function called
  • Anticipated output
  • Observed output

from php-iban.

globalcitizen avatar globalcitizen commented on August 11, 2024

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.

globalcitizen avatar globalcitizen commented on August 11, 2024

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)

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.