merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 14bec28b6a485beae1e1ecd4d1a29a0dae07546a
parent 1a3692d3415c30eb36c990dfd2fe0063160ed488
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Tue, 10 Mar 2026 10:25:45 +0100

fix #11221

Diffstat:
Mcontrib/kyc_text.en.must | 2+-
Msrc/backend/taler-merchant-httpd_get-private-kyc.c | 15+++++++++++----
2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/contrib/kyc_text.en.must b/contrib/kyc_text.en.must @@ -8,7 +8,7 @@ Payment service: {{exchange_url}} Currency : {{exchange_currency}} ──────────────────────────────────────── {{#limits}} -* {{operation_type}} within {{timeframe}} is allowed up to {{threshold}}. +* {{operation_type}} within {{interval}} is allowed up to {{threshold}}. {{#soft_limit}} This limit may be relaxed after additional legitimization steps. {{/soft_limit}} diff --git a/src/backend/taler-merchant-httpd_get-private-kyc.c b/src/backend/taler-merchant-httpd_get-private-kyc.c @@ -587,11 +587,13 @@ kyc_change_cb (void *cls, /** * Pack the given @a limit into the JSON @a limits array. * + * @param kr overall request context * @param limit account limit to pack * @param[in,out] limits JSON array to extend */ static void -pack_limit (const struct TALER_EXCHANGE_AccountLimit *limit, +pack_limit (const struct KycContext *kc, + const struct TALER_EXCHANGE_AccountLimit *limit, json_t *limits) { json_t *jl; @@ -599,8 +601,12 @@ pack_limit (const struct TALER_EXCHANGE_AccountLimit *limit, jl = GNUNET_JSON_PACK ( TALER_JSON_pack_kycte ("operation_type", limit->operation_type), - GNUNET_JSON_pack_time_rel ("timeframe", - limit->timeframe), + (POF_TEXT == kc->format) + ? GNUNET_JSON_pack_string ("interval", + GNUNET_TIME_relative2s (limit->timeframe, + true)) + : GNUNET_JSON_pack_time_rel ("timeframe", + limit->timeframe), TALER_JSON_pack_amount ("threshold", &limit->threshold), GNUNET_JSON_pack_bool ("soft_limit", @@ -648,7 +654,8 @@ get_exchange_limits ( const struct TALER_EXCHANGE_AccountLimit *limit = &keys->hard_limits[i]; - pack_limit (limit, + pack_limit (ekr->kc, + limit, limits); } for (unsigned int i = 0; i<keys->zero_limits_length; i++)