libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 6faef7b95a0fa297945852d5e5a584afdfe4b307
parent 34855306d980eb6fede98328d5604dffeb3d565e
Author: MS <ms@taler.net>
Date:   Mon, 23 Aug 2021 23:14:21 -1100

Sandbox: query story after bank account label.

Diffstat:
Msandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt | 3++-
Msandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 6+++---
2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt @@ -66,6 +66,7 @@ data class BankAccountRequest( ) data class CamtParams( - val iban: String, + // name/label of the bank account to query. + val bankaccount: String, val type: Int ) diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -519,10 +519,10 @@ fun serverMain(dbName: String, port: Int) { // only reason for a post is to hide the iban (to some degree.) post("/admin/payments/camt") { val body = call.receiveJson<CamtParams>() - val bankAccount = getBankAccountFromIban(body.iban) - val history = historyForAccount(bankAccount) + val bankaccount = getAccountFromLabel(body.bankaccount) + val history = historyForAccount(bankaccount) SandboxAssert(body.type == 53, "Only Camt.053 is implemented") - val camt53 = buildCamtString(body.type, body.iban, history) + val camt53 = buildCamtString(body.type, bankaccount.iban, history) call.respondText(camt53, ContentType.Text.Xml, HttpStatusCode.OK) return@post }