Finalized IDOB + small changes concerning redirects
This commit is contained in:
@ -21,16 +21,17 @@ class IBAN
|
||||
$newword = "";
|
||||
$wordarray = str_split($word);
|
||||
foreach ($wordarray as $v) {
|
||||
if(ctype_alpha($v)){
|
||||
if (ctype_alpha($v)) {
|
||||
$newword .= ord(strtolower($v)) - 87;
|
||||
}else{
|
||||
} else {
|
||||
$newword .= $v;
|
||||
}
|
||||
}
|
||||
return $newword;
|
||||
}
|
||||
|
||||
private function getCheckDigits($bignum){
|
||||
private function getCheckDigits($bignum)
|
||||
{
|
||||
//Modulo staartdeling
|
||||
$modulo97 = (int)substr($bignum, 0, 6);
|
||||
$modulo97 = $modulo97 % 97;
|
||||
@ -46,8 +47,9 @@ class IBAN
|
||||
}
|
||||
return $checkdigits;
|
||||
}
|
||||
|
||||
public function isValidIBAN($iban){
|
||||
|
||||
public function isValidIBAN($iban)
|
||||
{
|
||||
$iban = str_replace(" ", "", $iban);
|
||||
$landcode = substr($iban, 0, 2);
|
||||
$controle = substr($iban, 2, 2);
|
||||
@ -57,19 +59,22 @@ class IBAN
|
||||
$nummer = $this->wordToNumbers($identificatie);
|
||||
return $controle == $this->getCheckDigits($nummer);
|
||||
}
|
||||
|
||||
public function getRekeningNummer($iban){
|
||||
|
||||
public function getRekeningNummer($iban)
|
||||
{
|
||||
return substr(str_replace(" ", "", $iban), 8);
|
||||
}
|
||||
|
||||
public function getBank($iban){
|
||||
|
||||
public function getBank($iban)
|
||||
{
|
||||
return substr(str_replace(" ", "", $iban), 4, 4);
|
||||
}
|
||||
|
||||
public function getLand($iban){
|
||||
|
||||
public function getLand($iban)
|
||||
{
|
||||
return substr(str_replace(" ", "", $iban), 0, 2);
|
||||
}
|
||||
|
||||
|
||||
public function getIBAN($rekeningnr)
|
||||
{
|
||||
$landcode = "NL"; // NL in vertaling
|
||||
|
Reference in New Issue
Block a user