diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/model/mapper/BankDataMapper.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/model/mapper/BankDataMapper.kt index 4048cd4f..a6821eeb 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/model/mapper/BankDataMapper.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/model/mapper/BankDataMapper.kt @@ -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 + } + } \ No newline at end of file