From bea45cb661eae7334b35f5f3ea515fa9b74ff01d Mon Sep 17 00:00:00 2001 From: dankito Date: Wed, 13 May 2020 02:38:33 +0200 Subject: [PATCH] Implemented instant payment money transfer --- .../kotlin/net/dankito/fints/FinTsClient.kt | 1 + .../dankito/fints/messages/MessageBuilder.kt | 22 +++++++++----- .../messages/segmente/id/CustomerSegmentId.kt | 2 ++ ...eberweisung.kt => SepaBankTransferBase.kt} | 5 ++-- .../net/dankito/fints/model/AccountFeature.kt | 4 ++- .../dankito/fints/model/BankTransferData.kt | 3 +- ...ungTest.kt => SepaBankTransferBaseTest.kt} | 7 +++-- .../android/ui/dialogs/TransferMoneyDialog.kt | 16 +++++++++- .../main/res/layout/dialog_transfer_money.xml | 12 ++++++++ .../src/main/res/values-de/strings.xml | 1 + .../src/main/res/values/dimens.xml | 2 ++ .../src/main/res/values/strings.xml | 1 + .../src/main/resources/Messages.properties | 1 + .../src/main/resources/Messages_de.properties | 1 + .../cashtransfer/TransferMoneyDialog.kt | 29 +++++++++++++++++-- .../dankito/banking/ui/model/BankAccount.kt | 1 + .../ui/model/parameters/TransferMoneyData.kt | 3 +- .../banking/fints4javaBankingClient.kt | 2 +- .../banking/mapper/fints4javaModelMapper.kt | 3 +- .../dankito/banking/hbci4jBankingClient.kt | 1 + 20 files changed, 96 insertions(+), 21 deletions(-) rename fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/{SepaEinzelueberweisung.kt => SepaBankTransferBase.kt} (95%) rename fints4k/src/test/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/{SepaEinzelueberweisungTest.kt => SepaBankTransferBaseTest.kt} (87%) diff --git a/fints4k/src/main/kotlin/net/dankito/fints/FinTsClient.kt b/fints4k/src/main/kotlin/net/dankito/fints/FinTsClient.kt index 2f46bab1..567c6619 100644 --- a/fints4k/src/main/kotlin/net/dankito/fints/FinTsClient.kt +++ b/fints4k/src/main/kotlin/net/dankito/fints/FinTsClient.kt @@ -867,6 +867,7 @@ open class FinTsClient @JvmOverloads constructor( account.setSupportsFeature(AccountFeature.RetrieveAccountTransactions, messageBuilder.supportsGetTransactions(account)) account.setSupportsFeature(AccountFeature.RetrieveBalance, messageBuilder.supportsGetBalance(account)) account.setSupportsFeature(AccountFeature.TransferMoney, messageBuilder.supportsBankTransfer(account)) + account.setSupportsFeature(AccountFeature.InstantPayment, messageBuilder.supportsSepaInstantPaymentBankTransfer(account)) } protected open fun mapToTanProcedures(tanInfo: TanInfo): List { diff --git a/fints4k/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt b/fints4k/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt index 0b87aa01..f3ec7193 100644 --- a/fints4k/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt +++ b/fints4k/src/main/kotlin/net/dankito/fints/messages/MessageBuilder.kt @@ -12,7 +12,7 @@ import net.dankito.fints.messages.segmente.SegmentNumberGenerator import net.dankito.fints.messages.segmente.Synchronisierung import net.dankito.fints.messages.segmente.id.CustomerSegmentId import net.dankito.fints.messages.segmente.implementierte.* -import net.dankito.fints.messages.segmente.implementierte.sepa.SepaEinzelueberweisung +import net.dankito.fints.messages.segmente.implementierte.sepa.SepaBankTransferBase import net.dankito.fints.messages.segmente.implementierte.tan.TanGeneratorListeAnzeigen import net.dankito.fints.messages.segmente.implementierte.tan.TanGeneratorTanMediumAnOderUmmelden import net.dankito.fints.messages.segmente.implementierte.umsaetze.* @@ -199,16 +199,18 @@ open class MessageBuilder(protected val generator: ISegmentNumberGenerator = Seg } - open fun createBankTransferMessage(bankTransferData: BankTransferData, account: AccountData, dialogContext: DialogContext): MessageBuilderResult { + open fun createBankTransferMessage(data: BankTransferData, account: AccountData, dialogContext: DialogContext): MessageBuilderResult { - val messageBuilderResultAndNullableUrn = supportsBankTransferAndSepaVersion(account) + val segmentId = if (data.instantPayment) CustomerSegmentId.SepaInstantPaymentBankTransfer else CustomerSegmentId.SepaBankTransfer + + val messageBuilderResultAndNullableUrn = supportsBankTransferAndSepaVersion(account, segmentId) val result = messageBuilderResultAndNullableUrn.first val urn = messageBuilderResultAndNullableUrn.second if (result.isJobVersionSupported && urn != null) { val segments = listOf( - SepaEinzelueberweisung(generator.resetSegmentNumber(2), urn, dialogContext.customer, account, dialogContext.bank.bic, bankTransferData), - ZweiSchrittTanEinreichung(generator.getNextSegmentNumber(), TanProcess.TanProcess4, CustomerSegmentId.SepaBankTransfer) + SepaBankTransferBase(segmentId, generator.resetSegmentNumber(2), urn, dialogContext.customer, account, dialogContext.bank.bic, data), + ZweiSchrittTanEinreichung(generator.getNextSegmentNumber(), TanProcess.TanProcess4, segmentId) ) return createMessageBuilderResult(dialogContext, segments) @@ -218,11 +220,15 @@ open class MessageBuilder(protected val generator: ISegmentNumberGenerator = Seg } open fun supportsBankTransfer(account: AccountData): Boolean { - return supportsBankTransferAndSepaVersion(account).first.isJobVersionSupported + return supportsBankTransferAndSepaVersion(account, CustomerSegmentId.SepaBankTransfer).first.isJobVersionSupported } - protected open fun supportsBankTransferAndSepaVersion(account: AccountData): Pair { - val result = getSupportedVersionsOfJob(CustomerSegmentId.SepaBankTransfer, account, listOf(1)) + open fun supportsSepaInstantPaymentBankTransfer(account: AccountData): Boolean { + return supportsBankTransferAndSepaVersion(account, CustomerSegmentId.SepaInstantPaymentBankTransfer).first.isJobVersionSupported + } + + protected open fun supportsBankTransferAndSepaVersion(account: AccountData, segmentId: CustomerSegmentId): Pair { + val result = getSupportedVersionsOfJob(segmentId, account, listOf(1)) if (result.isJobVersionSupported) { diff --git a/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/id/CustomerSegmentId.kt b/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/id/CustomerSegmentId.kt index 474d0f79..c5fce4b2 100644 --- a/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/id/CustomerSegmentId.kt +++ b/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/id/CustomerSegmentId.kt @@ -23,6 +23,8 @@ enum class CustomerSegmentId(override val id: String) : ISegmentId { SepaBankTransfer("HKCCS"), + SepaInstantPaymentBankTransfer("HKIPZ"), + SepaAccountInfoParameters("HKSPA") // not implemented, retrieved automatically with UPD } \ No newline at end of file diff --git a/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaEinzelueberweisung.kt b/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaBankTransferBase.kt similarity index 95% rename from fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaEinzelueberweisung.kt rename to fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaBankTransferBase.kt index 7c0e16c3..7059201b 100644 --- a/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaEinzelueberweisung.kt +++ b/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaBankTransferBase.kt @@ -6,7 +6,8 @@ import net.dankito.fints.model.BankTransferData import net.dankito.fints.model.CustomerData -open class SepaEinzelueberweisung( +open class SepaBankTransferBase( + segmentId: CustomerSegmentId, segmentNumber: Int, sepaDescriptorUrn: String, debitor: CustomerData, @@ -17,7 +18,7 @@ open class SepaEinzelueberweisung( ) : SepaSegment( segmentNumber, - CustomerSegmentId.SepaBankTransfer, + segmentId, 1, sepaDescriptorUrn, if (sepaDescriptorUrn.contains("pain.001.003.03", true)) "pain.001.003.03.xml" else "pain.001.001.03.xml", diff --git a/fints4k/src/main/kotlin/net/dankito/fints/model/AccountFeature.kt b/fints4k/src/main/kotlin/net/dankito/fints/model/AccountFeature.kt index 1d7f5710..d8efbb79 100644 --- a/fints4k/src/main/kotlin/net/dankito/fints/model/AccountFeature.kt +++ b/fints4k/src/main/kotlin/net/dankito/fints/model/AccountFeature.kt @@ -7,6 +7,8 @@ enum class AccountFeature { RetrieveBalance, - TransferMoney + TransferMoney, + + InstantPayment } \ No newline at end of file diff --git a/fints4k/src/main/kotlin/net/dankito/fints/model/BankTransferData.kt b/fints4k/src/main/kotlin/net/dankito/fints/model/BankTransferData.kt index 9bda9c46..96a092ca 100644 --- a/fints4k/src/main/kotlin/net/dankito/fints/model/BankTransferData.kt +++ b/fints4k/src/main/kotlin/net/dankito/fints/model/BankTransferData.kt @@ -8,5 +8,6 @@ open class BankTransferData( val creditorIban: String, val creditorBic: String, val amount: BigDecimal, - val usage: String + val usage: String, + val instantPayment: Boolean = false ) \ No newline at end of file diff --git a/fints4k/src/test/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaEinzelueberweisungTest.kt b/fints4k/src/test/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaBankTransferBaseTest.kt similarity index 87% rename from fints4k/src/test/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaEinzelueberweisungTest.kt rename to fints4k/src/test/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaBankTransferBaseTest.kt index 7548322c..fee1947b 100644 --- a/fints4k/src/test/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaEinzelueberweisungTest.kt +++ b/fints4k/src/test/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaBankTransferBaseTest.kt @@ -1,5 +1,6 @@ package net.dankito.fints.messages.segmente.implementierte.sepa +import net.dankito.fints.messages.segmente.id.CustomerSegmentId import net.dankito.fints.model.AccountData import net.dankito.fints.model.BankTransferData import net.dankito.fints.model.CustomerData @@ -7,7 +8,7 @@ import org.assertj.core.api.Assertions.assertThat import org.junit.Test -class SepaEinzelueberweisungTest { +class SepaBankTransferBaseTest { companion object { @@ -28,7 +29,7 @@ class SepaEinzelueberweisungTest { fun format_Pain001_001_03() { // given - val underTest = SepaEinzelueberweisung(segmentNumber, + val underTest = SepaBankTransferBase(CustomerSegmentId.SepaBankTransfer, segmentNumber, "urn:iso:std:iso:20022:tech:xsd:pain.001.001.03", CustomerData("", "", "", debitorName), AccountData("", null, 0, "", debitorIban, "", null, null, "", null, null, listOf()), @@ -50,7 +51,7 @@ class SepaEinzelueberweisungTest { fun format_Pain001_003_03() { // given - val underTest = SepaEinzelueberweisung(segmentNumber, + val underTest = SepaBankTransferBase(CustomerSegmentId.SepaBankTransfer, segmentNumber, "urn:iso:std:iso:20022:tech:xsd:pain.001.003.03", CustomerData("", "", "", debitorName), AccountData("", null, 0, "", debitorIban, "", null, null, "", null, null, listOf()), diff --git a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt index 13e9544e..a3b2e6f7 100644 --- a/ui/BankingAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt +++ b/ui/BankingAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/TransferMoneyDialog.kt @@ -104,6 +104,7 @@ open class TransferMoneyDialog : DialogFragment() { rootView.spnBankAccounts.adapter = adapter rootView.spnBankAccounts.onItemSelectedListener = ListItemSelectedListener(adapter) { selectedBankAccount -> this.bankAccount = selectedBankAccount + setInstantPaymentControlsVisibility(rootView) } preselectedBankAccount?.let { rootView.spnBankAccounts.setSelection(adapter.getItems().indexOf(it)) } } @@ -138,11 +139,23 @@ open class TransferMoneyDialog : DialogFragment() { val decimalSeparator = DecimalFormatSymbols.getInstance().getDecimalSeparator() rootView.edtxtAmount.keyListener = DigitsKeyListener.getInstance("0123456789$decimalSeparator") + setInstantPaymentControlsVisibility(rootView) + rootView.btnCancel.setOnClickListener { dismiss() } rootView.btnTransferMoney.setOnClickListener { transferMoney() } } + private fun setInstantPaymentControlsVisibility(rootView: View) { + rootView.chkbxInstantPayment.visibility = + if (bankAccount.supportsInstantPaymentMoneyTransfer) { + View.VISIBLE + } + else { + View.GONE + } + } + private fun transferMoneyIfEnterPressed(editText: EditText) { editText.addEnterPressedListener { if (isRequiredDataEntered()) { @@ -221,7 +234,8 @@ open class TransferMoneyDialog : DialogFragment() { edtxtRemitteeIban.text.toString().replace(" ", ""), edtxtRemitteeBic.text.toString().replace(" ", ""), amount, - edtxtUsage.text.toString() + edtxtUsage.text.toString(), + chkbxInstantPayment.isChecked ) presenter.transferMoneyAsync(bankAccount, data) { diff --git a/ui/BankingAndroidApp/src/main/res/layout/dialog_transfer_money.xml b/ui/BankingAndroidApp/src/main/res/layout/dialog_transfer_money.xml index 9589d842..cfd5fa68 100644 --- a/ui/BankingAndroidApp/src/main/res/layout/dialog_transfer_money.xml +++ b/ui/BankingAndroidApp/src/main/res/layout/dialog_transfer_money.xml @@ -155,6 +155,18 @@ + + + BIC (wird automatisch eingetragen): Betrag: Verwendungszweck: + Echtzeitüberweisung Überweisen %1$s %2$s wurden erfolgreich an %3$s überwiesen. Konnte nicht %1$s %2$s an %3$s überweisen.\n\nFehlermeldung Ihrer Bank:\n\n%4$s diff --git a/ui/BankingAndroidApp/src/main/res/values/dimens.xml b/ui/BankingAndroidApp/src/main/res/values/dimens.xml index e182d497..7b789222 100644 --- a/ui/BankingAndroidApp/src/main/res/values/dimens.xml +++ b/ui/BankingAndroidApp/src/main/res/values/dimens.xml @@ -45,6 +45,8 @@ 4dp 12dp 50dp + 6dp + 6dp 120dp 4dp diff --git a/ui/BankingAndroidApp/src/main/res/values/strings.xml b/ui/BankingAndroidApp/src/main/res/values/strings.xml index b5e28df2..493d9da5 100644 --- a/ui/BankingAndroidApp/src/main/res/values/strings.xml +++ b/ui/BankingAndroidApp/src/main/res/values/strings.xml @@ -54,6 +54,7 @@ BIC (will be entered automatically): Amount: Usage: + Instant payment Transfer Successfully transferred %1$s %2$s to %3$s. Could not transfer %1$s %2$s to %3$s.\n\nError message from your bank:\n\n%4$s diff --git a/ui/BankingJavaFxApp/src/main/resources/Messages.properties b/ui/BankingJavaFxApp/src/main/resources/Messages.properties index 031e23c5..61484ec3 100755 --- a/ui/BankingJavaFxApp/src/main/resources/Messages.properties +++ b/ui/BankingJavaFxApp/src/main/resources/Messages.properties @@ -61,6 +61,7 @@ transfer.money.dialog.remittee.bank.label=Bank: transfer.money.dialog.remittee.bic.label=BIC: transfer.money.dialog.amount.label=Amount: transfer.money.dialog.usage.label=Usage: +transfer.money.dialog.instant.payment.label=Instant payment transfer.money.dialog.transfer.money.label=Transfer transfer.money.dialog.bank.name.will.be.entered.automatically=Will be entered automatically transfer.money.dialog.bank.not.found.for.iban=No bank found for this IBAN diff --git a/ui/BankingJavaFxApp/src/main/resources/Messages_de.properties b/ui/BankingJavaFxApp/src/main/resources/Messages_de.properties index 3d25d775..6f9e1c7a 100755 --- a/ui/BankingJavaFxApp/src/main/resources/Messages_de.properties +++ b/ui/BankingJavaFxApp/src/main/resources/Messages_de.properties @@ -61,6 +61,7 @@ transfer.money.dialog.remittee.bank.label=Bank: transfer.money.dialog.remittee.bic.label=BIC: transfer.money.dialog.amount.label=Betrag: transfer.money.dialog.usage.label=Verwendungszweck: +transfer.money.dialog.instant.payment.label=Echtzeitüberweisung transfer.money.dialog.transfer.money.label=Überweisen transfer.money.dialog.bank.name.will.be.entered.automatically=Wird automatisch eingetragen transfer.money.dialog.bank.not.found.for.iban=Für diese IBAN wurde keine Bank gefunden diff --git a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt index a654fcc8..12ed574c 100644 --- a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt +++ b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/dialogs/cashtransfer/TransferMoneyDialog.kt @@ -36,7 +36,7 @@ open class TransferMoneyDialog @JvmOverloads constructor( } - protected val selectedBankAccount = SimpleObjectProperty(preselectedBankAccount ?: presenter.bankAccounts.firstOrNull()) + protected val selectedBankAccount = SimpleObjectProperty(preselectedBankAccount ?: presenter.bankAccounts.firstOrNull { it.supportsTransferringMoney }) protected val remitteeName = SimpleStringProperty(preselectedValues?.creditorName ?: "") @@ -52,6 +52,10 @@ open class TransferMoneyDialog @JvmOverloads constructor( protected val usage = SimpleStringProperty(preselectedValues?.usage ?: "") + protected val instantPayment = SimpleBooleanProperty(false) + + protected val supportsInstantPayment = SimpleBooleanProperty(selectedBankAccount.value?.supportsInstantPaymentMoneyTransfer ?: false) + protected val requiredDataEntered = SimpleBooleanProperty(false) @@ -61,6 +65,8 @@ open class TransferMoneyDialog @JvmOverloads constructor( init { + selectedBankAccount.addListener { _, _, newValue -> selectedBankAccountChanged(newValue) } + remitteeName.addListener { _, _, _ -> checkIfRequiredDataEnteredOnUiThread() } remitteeIban.addListener { _, _, newValue -> tryToGetBicFromIban(newValue) } remitteeBic.addListener { _, _, _ -> checkIfRequiredDataEnteredOnUiThread() } @@ -155,6 +161,16 @@ open class TransferMoneyDialog @JvmOverloads constructor( fixedHeight = TextFieldHeight } } + + field { + alignment = Pos.CENTER_LEFT + + checkbox(messages["transfer.money.dialog.instant.payment.label"], instantPayment) { + fixedHeight = TextFieldHeight + + enableWhen(supportsInstantPayment) + } + } } } @@ -194,6 +210,14 @@ open class TransferMoneyDialog @JvmOverloads constructor( } + private fun selectedBankAccountChanged(newValue: BankAccount?) { + supportsInstantPayment.value = newValue?.supportsInstantPaymentMoneyTransfer ?: false + + if (supportsInstantPayment.value == false) { + instantPayment.value = false + } + } + protected open fun tryToGetBicFromIban(enteredIban: String) { presenter.findUniqueBankForIbanAsync(enteredIban) { foundBank -> runLater { @@ -249,7 +273,8 @@ open class TransferMoneyDialog @JvmOverloads constructor( remitteeIban.value.replace(" ", ""), remitteeBic.value.replace(" ", ""), amount.value.toBigDecimal(), - usage.value + usage.value, + instantPayment.value ) presenter.transferMoneyAsync(bankAccount, data) { diff --git a/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/BankAccount.kt b/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/BankAccount.kt index a6331796..fdb19065 100644 --- a/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/BankAccount.kt +++ b/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/BankAccount.kt @@ -19,6 +19,7 @@ open class BankAccount @JvmOverloads constructor( var supportsRetrievingAccountTransactions: Boolean = false, var supportsRetrievingBalance: Boolean = false, var supportsTransferringMoney: Boolean = false, + var supportsInstantPaymentMoneyTransfer: Boolean = false, bookedAccountTransactions: List = listOf() ) { diff --git a/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/parameters/TransferMoneyData.kt b/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/parameters/TransferMoneyData.kt index 1086dc4c..aa627fbd 100644 --- a/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/parameters/TransferMoneyData.kt +++ b/ui/BankingUiCommon/src/main/java/net/dankito/banking/ui/model/parameters/TransferMoneyData.kt @@ -9,7 +9,8 @@ open class TransferMoneyData( val creditorIban: String, val creditorBic: String, val amount: BigDecimal, - val usage: String + val usage: String, + val instantPayment: Boolean = false ) { companion object { diff --git a/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/fints4javaBankingClient.kt b/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/fints4javaBankingClient.kt index 0b35ee0e..f5f2d436 100644 --- a/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/fints4javaBankingClient.kt +++ b/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/fints4javaBankingClient.kt @@ -119,7 +119,7 @@ open class fints4javaBankingClient( callback(BankingClientResponse(false, "Cannot find account for ${bankAccount.identifier}")) // TODO: translate } else { - val mappedData = BankTransferData(data.creditorName, data.creditorIban, data.creditorBic, data.amount, data.usage) + val mappedData = BankTransferData(data.creditorName, data.creditorIban, data.creditorBic, data.amount, data.usage, data.instantPayment) client.doBankTransferAsync(mappedData, account) { response -> saveData() diff --git a/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/mapper/fints4javaModelMapper.kt b/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/mapper/fints4javaModelMapper.kt index 73549b73..0462c23c 100644 --- a/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/mapper/fints4javaModelMapper.kt +++ b/ui/fints4kBankingClient/src/main/kotlin/net/dankito/banking/mapper/fints4javaModelMapper.kt @@ -105,7 +105,8 @@ open class fints4javaModelMapper { return BankAccount(account, accountData.accountIdentifier, accountData.accountHolderName, accountData.iban, accountData.subAccountAttribute, BigDecimal.ZERO, accountData.currency ?: "EUR", mapBankAccountType(accountData.accountType), accountData.supportsFeature(AccountFeature.RetrieveAccountTransactions), - accountData.supportsFeature(AccountFeature.RetrieveBalance), accountData.supportsFeature(AccountFeature.TransferMoney)) + accountData.supportsFeature(AccountFeature.RetrieveBalance), accountData.supportsFeature(AccountFeature.TransferMoney), + accountData.supportsFeature(AccountFeature.InstantPayment)) } open fun mapBankAccountType(type: AccountType?): BankAccountType { diff --git a/ui/hbci4jBankingClient/src/main/kotlin/net/dankito/banking/hbci4jBankingClient.kt b/ui/hbci4jBankingClient/src/main/kotlin/net/dankito/banking/hbci4jBankingClient.kt index 5d70557a..1067da96 100644 --- a/ui/hbci4jBankingClient/src/main/kotlin/net/dankito/banking/hbci4jBankingClient.kt +++ b/ui/hbci4jBankingClient/src/main/kotlin/net/dankito/banking/hbci4jBankingClient.kt @@ -266,6 +266,7 @@ open class hbci4jBankingClient( } protected open fun createTransferCashJob(handle: HBCIHandler, data: TransferMoneyData, bankAccount: BankAccount) { + // TODO: implement instant payment val transferCashJob = handle.newJob("UebSEPA") val source = mapper.mapToKonto(bank, bankAccount)