libeufin

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

commit eadc614c409e916889f85625fe985ba511c238f7
parent 545fa5cdf77e8458ffe7b1acfcec44bae8d8319c
Author: MS <ms@taler.net>
Date:   Mon,  2 Oct 2023 16:06:39 +0200

/admin/add-incoming: normalizing debit_account

Diffstat:
Mbank/src/main/kotlin/tech/libeufin/bank/WireGatewayApiHandlers.kt | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bank/src/main/kotlin/tech/libeufin/bank/WireGatewayApiHandlers.kt b/bank/src/main/kotlin/tech/libeufin/bank/WireGatewayApiHandlers.kt @@ -159,7 +159,8 @@ fun Routing.talerWireGatewayHandlers(db: Database, ctx: BankApplicationContext) "Reserve pub. already used", TalerErrorCode.TALER_EC_BANK_DUPLICATE_RESERVE_PUB_SUBJECT ) - val walletAccount = db.bankAccountGetFromInternalPayto(req.debit_account) + val strippedIbanPayto: String = stripIbanPayto(req.debit_account) ?: throw badRequest("Invalid debit_account payto URI") + val walletAccount = db.bankAccountGetFromInternalPayto(strippedIbanPayto) ?: throw notFound( "debit_account not found", TalerErrorCode.TALER_EC_BANK_UNKNOWN_ACCOUNT