Added bankCodeForOnlineBanking to make clear that bank code for online banking may differs from bank's bank code

This commit is contained in:
dankito 2020-09-08 16:26:41 +02:00
parent 744af2880c
commit e36576e4c6
4 changed files with 17 additions and 10 deletions

View File

@ -17,7 +17,7 @@ open class IdentifikationsSegment(
) : Segment(listOf(
Segmentkopf(CustomerSegmentId.Identification, 2, segmentNumber),
Kreditinstitutskennung(baseData.bank.countryCode, baseData.bank.bankCode),
Kreditinstitutskennung(baseData.bank.countryCode, baseData.bank.bankCodeForOnlineBanking),
KundenID(baseData.bank.customerId),
KundensystemID(baseData.bank.customerSystemId),
KundensystemStatus(baseData.bank.customerSystemStatus, Existenzstatus.Mandatory)

View File

@ -49,5 +49,5 @@ open class Signaturkopf(
SicherheitsdatumUndUhrzeit(date, time),
HashalgorithmusDatenelementgruppe(),
SignaturalgorithmusDatenelementgruppe(algorithm, mode),
Schluesselname(bank.countryCode, bank.bankCode, bank.customerId, Schluesselart.Signierschluessel, keyNumber, keyVersion)
Schluesselname(bank.countryCode, bank.bankCodeForOnlineBanking, bank.customerId, Schluesselart.Signierschluessel, keyNumber, keyVersion)
))

View File

@ -52,7 +52,7 @@ open class Verschluesselungskopf(
SicherheitsidentifikationDetails(bank.customerSystemId),
SicherheitsdatumUndUhrzeit(date, time),
VerschluesselungsalgorithmusDatenelementgruppe(mode, encryptionAlgorithm),
Schluesselname(bank.countryCode, bank.bankCode, bank.customerId, key, keyNumber, keyVersion),
Schluesselname(bank.countryCode, bank.bankCodeForOnlineBanking, bank.customerId, key, keyNumber, keyVersion),
KomprimierungsfunktionDatenelement(algorithm),
NotAllowedDatenelement() // Certificate not applicapable for PIN/TAN
))

View File

@ -61,13 +61,6 @@ open class BankData(
internal constructor() : this("", "", "", "", "") // for object deserializers
init {
// for UniCredit / HypVereinsbank for online banking '70020270' has to be used as bank code
if (bankName.contains("unicredit", true)) {
bankCode = "70020270"
}
}
protected val _accounts = mutableListOf<AccountData>()
@ -88,6 +81,20 @@ open class BankData(
}
/**
* Some banks use a special bank code for online banking that doesn't match bank's bank code, e. g. Hypo Vereinsbank
*/
open val bankCodeForOnlineBanking: String
get() {
// for UniCredit / HypVereinsbank for online banking '70020270' has to be used as bank code
if (bankName.contains("unicredit", true)) {
return "70020270"
}
return bankCode
}
open fun resetBpdVersion() {
bpdVersion = BPDVersion.VersionNotReceivedYet
}