Made BIC non-null

This commit is contained in:
dankl 2019-10-21 00:56:44 +02:00 committed by dankito
parent 61c8e3ac4b
commit f557c08267
4 changed files with 5 additions and 5 deletions

View File

@ -139,7 +139,7 @@ open class MessageBuilder(protected val generator: ISegmentNumberGenerator = Seg
getSepaUrnFor(CustomerSegmentId.SepaAccountInfoParameters, customer, "pain.001.001.03")?.let { urn -> getSepaUrnFor(CustomerSegmentId.SepaAccountInfoParameters, customer, "pain.001.001.03")?.let { urn ->
return MessageBuilderResult(createSignedMessage(bank, customer, dialogData, listOf( return MessageBuilderResult(createSignedMessage(bank, customer, dialogData, listOf(
SepaEinzelueberweisung(generator.resetSegmentNumber(2), urn, customer, bank.bic!!, bankTransferData), // TODO: get rid of '!!' SepaEinzelueberweisung(generator.resetSegmentNumber(2), urn, customer, bank.bic, bankTransferData),
ZweiSchrittTanEinreichung(generator.getNextSegmentNumber(), TanProcess.TanProcess4, CustomerSegmentId.SepaBankTransfer) ZweiSchrittTanEinreichung(generator.getNextSegmentNumber(), TanProcess.TanProcess4, CustomerSegmentId.SepaBankTransfer)
))) )))
} }

View File

@ -10,9 +10,9 @@ open class BankData(
var bankCode: String, var bankCode: String,
var countryCode: Int, var countryCode: Int,
var finTs3ServerAddress: String, var finTs3ServerAddress: String,
var bic: String,
var bpdVersion: Int = BPDVersion.VersionNotReceivedYet, var bpdVersion: Int = BPDVersion.VersionNotReceivedYet,
var name: String = "", var name: String = "",
var bic: String? = null,
/** /**
* Maximale Anzahl an Geschäftsvorfallsarten, die pro Nachricht zulässig ist. * Maximale Anzahl an Geschäftsvorfallsarten, die pro Nachricht zulässig ist.

View File

@ -50,7 +50,7 @@ class FinTsClientTest {
} }
private val BankDataAnonymous = BankData("10070000", Laenderkennzeichen.Germany, "https://fints.deutsche-bank.de/") private val BankDataAnonymous = BankData("10070000", Laenderkennzeichen.Germany, "https://fints.deutsche-bank.de/", "DEUTDEBBXXX")
// TODO: add your settings here: // TODO: add your settings here:
private val bankInfo = BankFinder().findBankByBankCode("<your bank code (BLZ) here>").first() private val bankInfo = BankFinder().findBankByBankCode("<your bank code (BLZ) here>").first()
@ -142,7 +142,7 @@ class FinTsClientTest {
assertThat(Customer.iban).describedAs("Customer's IBAN should now be set").isNotNull() assertThat(Customer.iban).describedAs("Customer's IBAN should now be set").isNotNull()
// transfer 1 cent to yourself. Transferring money to oneself also doesn't require to enter a TAN according to PSD2 // transfer 1 cent to yourself. Transferring money to oneself also doesn't require to enter a TAN according to PSD2
val BankTransferData = BankTransferData(Customer.name, Customer.iban!!, Bank.bic!!, 0.01.toBigDecimal(), "Give it to me baby") val BankTransferData = BankTransferData(Customer.name, Customer.iban!!, Bank.bic, 0.01.toBigDecimal(), "Give it to me baby")
// when // when

View File

@ -18,7 +18,7 @@ abstract class FinTsTestBase {
const val BankFinTsServerAddress = "banking.supi-dupi-bank.de/fints30" const val BankFinTsServerAddress = "banking.supi-dupi-bank.de/fints30"
val Bank = BankData(BankCode, BankCountryCode, "") val Bank = BankData(BankCode, BankCountryCode, "", "")
const val CustomerId = "0987654321" const val CustomerId = "0987654321"