Skip to content

Commit

Permalink
Add Bank of Slovenia (SI / 01) national checksum exception; v2.4.17
Browse files Browse the repository at this point in the history
  • Loading branch information
Walter Stanish committed Feb 25, 2016
1 parent ad0bd18 commit b043c96
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ Your Help Wanted
News: February 2016
-------------------

__[Version 2.4.17](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.17)__ has been released.
* Bank of Slovenia (bank code `01` under Slovenia (SI)) does not implement the national checksum scheme, as a special case. An exception has been added to the Slovenia national checksum implementation.

__[Version 2.4.16](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.16)__ has been released.
* Another bugfix release, based on further real world test IBANs from certain countries:
* Remove Sweden (SE) national checksum support
Expand Down
9 changes: 9 additions & 0 deletions php-iban.php
Original file line number Diff line number Diff line change
Expand Up @@ -1045,8 +1045,17 @@ function _iban_nationalchecksum_implementation_rs($iban,$mode) {
}

# Implement the national checksum for an Slovenia (SI) IBAN
# Note: It appears that the central bank does not use these
# checksums, thus an exception has been added.
# (NOTE: Reverse engineered)
function _iban_nationalchecksum_implementation_si($iban,$mode) {
$bank = iban_get_bank_part($iban);
# Bank of Slovenia does not use the legacy checksum scheme.
# Accounts in this namespace appear to be the central bank
# accounts for licensed local banks.
if($bank == '01') {
return '';
}
return _iban_nationalchecksum_implementation_mod97_10($iban,$mode);
}

Expand Down

0 comments on commit b043c96

Please sign in to comment.