merchant

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

commit 58eb6db9ef9030edd1b2b7cac641798fa174ea9d
parent 91729ce58f8579d7470c8c599a97c13dfbcc7b55
Author: Florian Dold <dold@taler.net>
Date:   Mon,  7 Sep 2026 13:48:58 +0200

merchant: apply pickup duration to all template orders

Put max_pickup_time inside the generated order for every template type.
Finite access periods now apply to Paivana and fixed-order templates as
well as inventory carts.

Issue: https://bugs.taler.net/n/11443

Diffstat:
Msrc/backend/taler-merchant-httpd_post-templates-TEMPLATE_ID.c | 26+++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_post-templates-TEMPLATE_ID.c b/src/backend/taler-merchant-httpd_post-templates-TEMPLATE_ID.c @@ -2084,19 +2084,6 @@ create_using_templates_inventory (struct UseContext *uc) NULL == uc->parse_request.summary ? uc->template_contract.summary : uc->parse_request.summary)))); - if (! GNUNET_TIME_relative_is_forever ( - uc->template_contract.max_pickup_duration)) - { - GNUNET_assert ( - 0 == - json_object_set_new ( - uc->ihc.request_body, - "max_pickup_time", - GNUNET_JSON_from_timestamp ( - GNUNET_TIME_absolute_to_timestamp ( - GNUNET_TIME_relative_to_absolute ( - uc->template_contract.max_pickup_duration))))); - } } @@ -2185,6 +2172,19 @@ handle_phase_create_order (struct UseContext *uc) order = json_object_get (uc->ihc.request_body, "order"); GNUNET_assert (json_is_object (order)); + if (! GNUNET_TIME_relative_is_forever ( + uc->template_contract.max_pickup_duration)) + { + GNUNET_assert ( + 0 == + json_object_set_new ( + order, + "max_pickup_time", + GNUNET_JSON_from_timestamp ( + GNUNET_TIME_absolute_to_timestamp ( + GNUNET_TIME_relative_to_absolute ( + uc->template_contract.max_pickup_duration))))); + } /* A zero duration means that the template did not specify one. Leave the deadline absent in that case so the regular order handler applies the instance default. Older backends accepted FOREVER; also use the instance