merchant

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

commit 9c98e0a5ae7b9adda127ea0e7403a342444b171f
parent b151689ed9f0770c2a2a31569493b00f7664916f
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Fri, 14 Aug 2026 23:23:14 +0200

do include all fields in request

Diffstat:
Msrc/lib/merchant_api_patch-private-products-PRODUCT_ID.c | 44+++++++++++++++++++++++++++-----------------
1 file changed, 27 insertions(+), 17 deletions(-)

diff --git a/src/lib/merchant_api_patch-private-products-PRODUCT_ID.c b/src/lib/merchant_api_patch-private-products-PRODUCT_ID.c @@ -495,26 +495,36 @@ TALER_MERCHANT_patch_private_product_start ( GNUNET_JSON_pack_allow_null ( GNUNET_JSON_pack_object_incref ("address", pph->address)), + GNUNET_JSON_pack_conditional ( + pph->have_minimum_age, + GNUNET_JSON_pack_uint64 ("minimum_age", + pph->minimum_age)), + GNUNET_JSON_pack_conditional ( + pph->have_product_group_id, + GNUNET_JSON_pack_uint64 ("product_group_id", + pph->product_group_id)), + GNUNET_JSON_pack_conditional ( + pph->have_money_pot_id, + GNUNET_JSON_pack_uint64 ("money_pot_id", + pph->money_pot_id)), + GNUNET_JSON_pack_conditional ( + pph->have_unit_allow_fraction && + pph->unit_allow_fraction, + GNUNET_JSON_pack_bool ("unit_allow_fraction", + pph->unit_allow_fraction)), + GNUNET_JSON_pack_conditional ( + pph->have_unit_allow_fraction && + pph->unit_allow_fraction && + pph->have_unit_precision_level, + GNUNET_JSON_pack_uint64 ("unit_precision_level", + pph->unit_precision_level)), + GNUNET_JSON_pack_conditional ( + pph->have_price_is_net, + GNUNET_JSON_pack_bool ("price_is_net", + pph->price_is_net)), GNUNET_JSON_pack_allow_null ( GNUNET_JSON_pack_timestamp ("next_restock", pph->next_restock))); - if (pph->have_unit_allow_fraction && - pph->unit_allow_fraction) - { - GNUNET_assert (0 == - json_object_set_new (req_obj, - "unit_allow_fraction", - json_boolean ( - pph->unit_allow_fraction))); - if (pph->have_unit_precision_level) - { - GNUNET_assert (0 == - json_object_set_new (req_obj, - "unit_precision_level", - json_integer ( - pph->unit_precision_level))); - } - } eh = TALER_MERCHANT_curl_easy_get_ (pph->url); if ( (NULL == eh) || (GNUNET_OK !=