-
Notifications
You must be signed in to change notification settings - Fork 0
Class SepaCntryValidationDE
Full name: \SKien\Sepa\CntryValidation\SepaCntryValidationDE
Parent class: \SKien\Sepa\CntryValidation\SepaCntryValidationBase
IBAN | DE11 6829 0000 0009 2158 08 |
BIC | GENODE61LAH |
CI | DE79 ZZZ 01234567890 / DE98 ZZZ 09999999999 |
CC | ISO Country Code |
pp | 2 digits IBAN checksum |
b | banking code 8 digits |
k | account number 10 digits |
Length: 22
C | ISO Country Code |
p | 2 digits IBAN checksum |
Z | 3 digits alphanum creditor business code |
0 | 1 digit fixed value 0 |
n | 10 digits numeric national identification code |
Length: 18
All validation can be done with specification of length and regex to match format!
Method | Description |
---|---|
__construct | Create instance of german validation. |
validateBIC | Validates given BIC. |
validateCI | Validates given CI (Creditor Scheme Identification). |
validateIBAN | Validates given IBAN. |
Create instance of german validation.
public SepaCntryValidationDE::__construct(string $strCntry)
Parameters:
Parameter | Type | Description |
---|---|---|
strCntry |
string | 2 sign country code |
Validates given BIC.
public SepaCntryValidationBase::validateBIC(string $strBIC) : int
Follows ISO 9362
as far as I have determined, the format of the BIC is uniform within
the participating countries for SEPA.
Parameters:
Parameter | Type | Description |
---|---|---|
strBIC |
string | BIC to validate |
Return Type: int
Sepa::OK or errorcode
- Sepa::ERR_BIC_INVALID invalid BIC
- Sepa::ERR_BIC_INVALID_CNTRY invalid country code
Validates given CI (Creditor Scheme Identification).
public SepaCntryValidationBase::validateCI(string $strCI) : int
The general structure for the CI is the following:
- Position 1-2 filled with the ISO country code
- Position 3-4 filled with the check digit according to ISO 7064 Mod 97-10
- Position 5-7 filled with the Creditor Business Code, if not used then filled with ZZZ
- Position 8 onwards filled with the country specific part of the identifier being a national identifier of the Creditor as defined by the concerned national community.
NOTE: the CBC is not taken into account when calculating the checksum!
Parameters:
Parameter | Type | Description |
---|---|---|
strCI |
string | CI to validate |
Return Type: int
Sepa::OK or errorcode
- Sepa::ERR_CI_INVALID_CNTRY invalid country code
- Sepa::ERR_CI_INVALID_LENGTH invalid length
- Sepa::ERR_CI_INVALID_SIGN CI contains invalid sign(s)
- Sepa::ERR_CI_CHECKSUM wrong checksum
See Also:
- https://www.sepaforcorporates.com/sepa-direct-debits/sepa-creditor-identifier/
- https://www.europeanpaymentscouncil.eu/sites/default/files/kb/file/2019-09/EPC262-08%20v7.0%20Creditor%20Identifier%20Overview_0.pdf
- online CI Validator
- http://www.maric.info/fin/SEPA/ddchkden.htm
Validates given IBAN.
public SepaCntryValidationBase::validateIBAN(string $strIBAN) : int
Parameters:
Parameter | Type | Description |
---|---|---|
strIBAN |
string | IBAN to validate |
Return Type: int
Sepa::OK or errorcode
- Sepa::ERR_IBAN_INVALID_CNTRY invalid country code
- Sepa::ERR_IBAN_INVALID_LENGTH invalid length
- Sepa::ERR_IBAN_INVALID_SIGN IBAN contains invalid sign(s)
- Sepa::ERR_IBAN_CHECKSUM wrong checksum
See Also:
build with phpDocumentor 3 using template phpdoc2githubwiki / (2021-08-31)