Fixed that UniCredit uses a centralized bank code for online banking
This commit is contained in:
parent
e71799fcc3
commit
841b23c970
|
@ -9,7 +9,7 @@ open class BankDataMapper {
|
|||
|
||||
open fun mapFromBankInfo(bankInfo: BankInfo): BankData {
|
||||
return BankData(
|
||||
bankInfo.bankCode,
|
||||
getBankCodeForOnlineBanking(bankInfo),
|
||||
Laenderkennzeichen.Germany, // TODO: currently there are only German banks. But change this if ever other countries get supported
|
||||
bankInfo.pinTanAddress ?: "",
|
||||
name = bankInfo.name,
|
||||
|
@ -17,4 +17,13 @@ open class BankDataMapper {
|
|||
)
|
||||
}
|
||||
|
||||
protected open fun getBankCodeForOnlineBanking(bankInfo: BankInfo): String {
|
||||
// for UniCredit / HypVereinsbank for online banking '70020270' has to be used as bank code
|
||||
if (bankInfo.name.contains("unicredit", true)) {
|
||||
return "70020270"
|
||||
}
|
||||
|
||||
return bankInfo.bankCode
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue