merchant

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

commit a0b335cf76fab2ec1ba22a686aeddaebfc7f9da5
parent f25e67c2c329998dc0827a38834548b75a168ae4
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 29 Dec 2025 17:32:01 +0100

fix #10842

Diffstat:
Msrc/backend/taler-merchant-httpd_private-get-transfers.c | 6+++++-
Msrc/include/taler_merchant_service.h | 1+
Msrc/lib/merchant_api_get_transfers.c | 6++++--
3 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_private-get-transfers.c b/src/backend/taler-merchant-httpd_private-get-transfers.c @@ -71,7 +71,11 @@ transfer_cb (void *cls, true), GNUNET_JSON_pack_bool ("expected", expected), - GNUNET_JSON_pack_timestamp ( + GNUNET_TIME_absolute_is_zero (execution_time) + ? GNUNET_JSON_pack_allow_null ( + GNUNET_JSON_pack_string ("dummy", + NULL)) + : GNUNET_JSON_pack_timestamp ( "execution_time", GNUNET_TIME_absolute_to_timestamp (execution_time))); GNUNET_assert (0 == diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h @@ -3084,6 +3084,7 @@ struct TALER_MERCHANT_WireTransfer * When the transfer took place (note: may not be exact, * as the time at which the exchange initiated the transfer * may differ from the time the bank or the merchant observed). + * Zero if not known. */ struct GNUNET_TIME_Timestamp execution_time; diff --git a/src/lib/merchant_api_get_transfers.c b/src/lib/merchant_api_get_transfers.c @@ -136,8 +136,10 @@ handle_transfers_get_finished (void *cls, &td->exchange_url), GNUNET_JSON_spec_uint64 ("transfer_serial_id", &td->credit_serial), - GNUNET_JSON_spec_timestamp ("execution_time", - &td->execution_time), + GNUNET_JSON_spec_mark_optional ( + GNUNET_JSON_spec_timestamp ("execution_time", + &td->execution_time), + NULL), GNUNET_JSON_spec_bool ("expected", &td->expected), GNUNET_JSON_spec_end ()