As getUsersTanProcedures() doesn't fetch user's bank accounts anymore I added getAccounts()
This commit is contained in:
parent
c7a814b0bb
commit
529467623c
|
@ -183,6 +183,23 @@ open class FinTsClient(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected open fun getAccounts(bank: BankData, customer: CustomerData, callback: (AddAccountResponse) -> Unit) {
|
||||||
|
|
||||||
|
val dialogContext = DialogContext(bank, customer, product)
|
||||||
|
|
||||||
|
initDialogAfterSuccessfulChecks(dialogContext) { response ->
|
||||||
|
closeDialog(dialogContext)
|
||||||
|
|
||||||
|
if (response.successful) {
|
||||||
|
updateBankData(bank, response)
|
||||||
|
updateCustomerData(customer, bank, response)
|
||||||
|
}
|
||||||
|
|
||||||
|
callback(AddAccountResponse(response, bank, customer))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* According to specification synchronizing customer system id is required:
|
* According to specification synchronizing customer system id is required:
|
||||||
* "Die Kundensystem-ID ist beim HBCI RAH- / RDH- sowie dem PIN/TAN-Verfahren erforderlich."
|
* "Die Kundensystem-ID ist beim HBCI RAH- / RDH- sowie dem PIN/TAN-Verfahren erforderlich."
|
||||||
|
@ -248,6 +265,12 @@ open class FinTsClient(
|
||||||
|
|
||||||
getTanMediaList(bank, customer, TanMedienArtVersion.Alle, TanMediumKlasse.AlleMedien) {
|
getTanMediaList(bank, customer, TanMedienArtVersion.Alle, TanMediumKlasse.AlleMedien) {
|
||||||
|
|
||||||
|
getAccounts(bank, customer) { getAccountsResponse ->
|
||||||
|
|
||||||
|
if (getAccountsResponse.isSuccessful == false) {
|
||||||
|
callback(getAccountsResponse)
|
||||||
|
return@getAccounts
|
||||||
|
}
|
||||||
|
|
||||||
/* Fourth dialog: Try to retrieve account transactions of last 90 days without TAN */
|
/* Fourth dialog: Try to retrieve account transactions of last 90 days without TAN */
|
||||||
|
|
||||||
|
@ -276,6 +299,8 @@ open class FinTsClient(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue