From eb1a3cac99da5967e9f05f68f365edb9e0284c60 Mon Sep 17 00:00:00 2001 From: Walter Stanish Date: Fri, 26 Feb 2016 07:39:28 +0800 Subject: [PATCH] Netherlands (NL) bank INGB no longer uses national checksum scheme --- php-iban.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/php-iban.php b/php-iban.php index a658055..d850c9a 100644 --- a/php-iban.php +++ b/php-iban.php @@ -996,9 +996,15 @@ function _iban_nationalchecksum_implementation_mk($iban,$mode) { } # Implement the national checksum for an Netherlands (NL) IBAN -# (Credit: Validate_NL PEAR class) +# This applies to most banks, but not to 'INGB', therefore we +# treat it specially here. +# (Original code: Validate_NL PEAR class, since extended) function _iban_nationalchecksum_implementation_nl($iban,$mode) { if($mode != 'set' && $mode != 'find' && $mode != 'verify') { return ''; } # blank value on return to distinguish from correct execution + $bank = iban_get_bank_part($iban); + if(strtoupper($bank) == 'INGB') { + return ''; + } $account = iban_get_account_part($iban); $checksum = 0; for ($i = 0; $i < 10; $i++) {