OXID eShop CE  6.1.5
OxidEsales\EshopCommunity\Core\SepaIBANValidator Class Reference
+ Collaboration diagram for OxidEsales\EshopCommunity\Core\SepaIBANValidator:

Public Member Functions

 isValid ($sIBAN)
 
 isValidCodeLengths ($aCodeLengths)
 
 setCodeLengths ($aCodeLengths)
 
 getCodeLengths ()
 

Public Attributes

const IBAN_ALGORITHM_MOD_VALUE = 97
 

Protected Member Functions

 _isLengthValid ($sIBAN)
 
 _getLengthForCountry ($sIBAN)
 
 _isAlgorithmValid ($sIBAN)
 
 _moveInitialCharactersToEnd ($sIBAN)
 
 _replaceLettersToNumbers ($sIBAN)
 
 _isIBANChecksumValid ($sIBAN)
 
 _isNotEmptyArray ($aCodeLengths)
 
 _isEachCodeLengthValid ($aCodeLengths)
 
 _isCodeLengthKeyValid ($sCountryAbbr)
 
 _isCodeLengthValueValid ($iLength)
 

Protected Attributes

 $_aCodeLengths = []
 

Detailed Description

SEPA (Single Euro Payments Area) validation class

Member Function Documentation

◆ _getLengthForCountry()

OxidEsales\EshopCommunity\Core\SepaIBANValidator::_getLengthForCountry (   $sIBAN)
protected

Gets length for country.

Parameters
string$sIBANIBAN
Returns
null

◆ _isAlgorithmValid()

OxidEsales\EshopCommunity\Core\SepaIBANValidator::_isAlgorithmValid (   $sIBAN)
protected

Checks if IBAN is valid according to checksum algorithm

Parameters
string$sIBANIBAN
Returns
bool

◆ _isCodeLengthKeyValid()

OxidEsales\EshopCommunity\Core\SepaIBANValidator::_isCodeLengthKeyValid (   $sCountryAbbr)
protected

Checks if country code is valid

Parameters
string$sCountryAbbrCountry abbreviation
Returns
bool

◆ _isCodeLengthValueValid()

OxidEsales\EshopCommunity\Core\SepaIBANValidator::_isCodeLengthValueValid (   $iLength)
protected

Checks if value is numeric and does not contain whitespaces

Parameters
integer$iLengthLength
Returns
bool

◆ _isEachCodeLengthValid()

OxidEsales\EshopCommunity\Core\SepaIBANValidator::_isEachCodeLengthValid (   $aCodeLengths)
protected

Checks if each code length is valid.

Parameters
array$aCodeLengthsCode lengths
Returns
bool

◆ _isIBANChecksumValid()

OxidEsales\EshopCommunity\Core\SepaIBANValidator::_isIBANChecksumValid (   $sIBAN)
protected

Interpret the string as a decimal integer and compute the remainder of that number on division by 97.

Parameters
string$sIBANIBAN
Returns
bool

◆ _isLengthValid()

OxidEsales\EshopCommunity\Core\SepaIBANValidator::_isLengthValid (   $sIBAN)
protected

Check if the total IBAN length is correct as per country. If not, the IBAN is invalid.

Parameters
string$sIBANIBAN
Returns
bool

◆ _isNotEmptyArray()

OxidEsales\EshopCommunity\Core\SepaIBANValidator::_isNotEmptyArray (   $aCodeLengths)
protected

Checks if Code length is non empty array

Parameters
array$aCodeLengthsCode lengths
Returns
bool

◆ _moveInitialCharactersToEnd()

OxidEsales\EshopCommunity\Core\SepaIBANValidator::_moveInitialCharactersToEnd (   $sIBAN)
protected

Move the four initial characters to the end of the string.

Parameters
string$sIBANIBAN
Returns
string

◆ _replaceLettersToNumbers()

OxidEsales\EshopCommunity\Core\SepaIBANValidator::_replaceLettersToNumbers (   $sIBAN)
protected

Replace each letter in the string with two digits, thereby expanding the string, where A = 10, B = 11, ..., Z = 35.

Parameters
string$sIBANIBAN
Returns
string

◆ getCodeLengths()

OxidEsales\EshopCommunity\Core\SepaIBANValidator::getCodeLengths ( )

Get IBAN length by country data

Returns
array

◆ isValid()

OxidEsales\EshopCommunity\Core\SepaIBANValidator::isValid (   $sIBAN)

International bank account number validation

An IBAN is validated by converting it into an integer and performing a basic mod-97 operation (as described in ISO 7064) on it. If the IBAN is valid, the remainder equals 1.

Parameters
string$sIBANcode to check
Returns
bool

◆ isValidCodeLengths()

OxidEsales\EshopCommunity\Core\SepaIBANValidator::isValidCodeLengths (   $aCodeLengths)

Validation of IBAN registry

Parameters
array$aCodeLengths
Returns
bool

◆ setCodeLengths()

OxidEsales\EshopCommunity\Core\SepaIBANValidator::setCodeLengths (   $aCodeLengths)

Set IBAN Registry

Parameters
array$aCodeLengths
Returns
bool

Member Data Documentation

◆ $_aCodeLengths

OxidEsales\EshopCommunity\Core\SepaIBANValidator::$_aCodeLengths = []
protected

◆ IBAN_ALGORITHM_MOD_VALUE

const OxidEsales\EshopCommunity\Core\SepaIBANValidator::IBAN_ALGORITHM_MOD_VALUE = 97

The documentation for this class was generated from the following file: