From 8bc3f0fe8e2192e817b26c89eeeaf74279dd9b5a Mon Sep 17 00:00:00 2001 From: dankito Date: Thu, 14 May 2020 01:39:44 +0200 Subject: [PATCH] Fixed setting all account information on KontoverbindungInternation for SEPA money transfer --- .../segmente/implementierte/sepa/SepaBankTransferBase.kt | 2 +- .../messages/segmente/implementierte/sepa/SepaSegment.kt | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaBankTransferBase.kt b/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaBankTransferBase.kt index 7059201b..8c400d5f 100644 --- a/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaBankTransferBase.kt +++ b/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaBankTransferBase.kt @@ -22,7 +22,7 @@ open class SepaBankTransferBase( 1, sepaDescriptorUrn, if (sepaDescriptorUrn.contains("pain.001.003.03", true)) "pain.001.003.03.xml" else "pain.001.001.03.xml", - account.iban ?: "", // TODO: what to do if iban is not set? + account, debitorBic, mapOf( SepaMessageCreator.NumberOfTransactionsKey to "1", // TODO: may someday support more then one transaction per file diff --git a/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaSegment.kt b/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaSegment.kt index c66745e4..7d486dbe 100644 --- a/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaSegment.kt +++ b/fints4k/src/main/kotlin/net/dankito/fints/messages/segmente/implementierte/sepa/SepaSegment.kt @@ -7,6 +7,7 @@ import net.dankito.fints.messages.datenelementgruppen.implementierte.Segmentkopf import net.dankito.fints.messages.datenelementgruppen.implementierte.account.KontoverbindungInternational import net.dankito.fints.messages.segmente.Segment import net.dankito.fints.messages.segmente.id.ISegmentId +import net.dankito.fints.model.AccountData open class SepaSegment( @@ -15,14 +16,14 @@ open class SepaSegment( segmentVersion: Int, sepaDescriptorUrn: String, sepaFileName: String, - iban: String, + account: AccountData, bic: String, replacementStrings: Map, messageCreator: ISepaMessageCreator = SepaMessageCreator() ) : Segment(listOf( Segmentkopf(segmentId, segmentVersion, segmentNumber), - KontoverbindungInternational(iban, bic, null), + KontoverbindungInternational(account, bic), object : AlphanumerischesDatenelement(sepaDescriptorUrn, Existenzstatus.Mandatory, 256) { }, SepaMessage(sepaFileName, replacementStrings, messageCreator) )) \ No newline at end of file