libeufin

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

commit bbafc9e3bf79d2357543cb5e3a457f5a4d7f4e6f
parent fcf52f42da84ecec516d2b614f3cecb0ac272686
Author: Antoine A <>
Date:   Thu, 28 May 2026 18:27:43 +0200

nexus: support ch-qrr for testing

Diffstat:
Mcontrib/nexus.conf | 7+++++--
Mlibeufin-common/src/main/kotlin/TalerCommon.kt | 4+++-
Mlibeufin-nexus/src/main/kotlin/tech/libeufin/nexus/cli/Testing.kt | 7++++++-
3 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/contrib/nexus.conf b/contrib/nexus.conf @@ -46,12 +46,15 @@ BANK_DIALECT = postfinance # Exchange accounts bounce invalid incoming Taler transactions. ACCOUNT_TYPE = exchange +# QR IBAN of a QR virtual bank account linked to the configured bank account that can be used for QR BILL +# QR_IBAN = CH4431999123000889012 + [nexus-setup] # Bank encryption public key hash -# BANK_ENCRYPTION_PUB_KEY_HASH = +# BANK_ENCRYPTION_PUB_KEY_HASH = # Bank authentication public key hash -# BANK_AUTHENTICATION_PUB_KEY_HASH = +# BANK_AUTHENTICATION_PUB_KEY_HASH = [libeufin-nexusdb-postgres] # Where are the SQL files to setup our tables? diff --git a/libeufin-common/src/main/kotlin/TalerCommon.kt b/libeufin-common/src/main/kotlin/TalerCommon.kt @@ -454,8 +454,9 @@ sealed class Payto { amount, message, receiverName, + parsed.parameters["ch-qrr"], bic, - iban + iban, ) } @@ -487,6 +488,7 @@ class IbanPayto internal constructor( override val amount: TalerAmount?, override val message: String?, override val receiverName: String?, + val chQrr: String?, val bic: String?, val iban: IBAN ) : Payto() { diff --git a/libeufin-nexus/src/main/kotlin/tech/libeufin/nexus/cli/Testing.kt b/libeufin-nexus/src/main/kotlin/tech/libeufin/nexus/cli/Testing.kt @@ -82,6 +82,10 @@ class FakeIncoming : TalerCmd() { "--subject", help = "The payment subject, payto 'message' parameter takes the precedence" ) + private val chQrr by option( + "--ch-qrr", + help = "The payment reference, payto 'ch-qrr' parameter takes the precedence" + ) private val payto by argument( help = "The debited account IBAN payto URI" ).convert { Payto.parse(it).expectIban() } @@ -90,6 +94,7 @@ class FakeIncoming : TalerCmd() { nexusConfig(config).withDb { db, cfg -> val subject = requireNotNull(payto.message ?: subject) { "Missing subject" } val amount = requireNotNull(payto.amount ?: amount) { "Missing amount" } + val reference = payto.chQrr ?: chQrr require(amount.currency == cfg.currency) { "Wrong currency: expected ${cfg.currency} got ${amount.currency}" @@ -100,7 +105,7 @@ class FakeIncoming : TalerCmd() { IncomingPayment( amount = amount, debtor = payto, - subject = subject, + subject = reference ?: subject, creditFee = creditFee, executionTime = Instant.now(), id = IncomingId(null, randEbicsId(), null)