merchant

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

commit b6099571f5aeaecb03f4a0a7b2a35266d269611c
parent d81c31445686871d91f1fcda0b49748dde1dd1be
Author: bohdan-potuzhnyi <bohdan.potuzhnyi@gmail.com>
Date:   Tue,  9 Jun 2026 08:41:25 +0200

#0011488

Diffstat:
Msrc/backenddb/select_unit.c | 3+++
Msrc/testing/test_merchant_api.c | 22++++++++++++++++++----
2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/src/backenddb/select_unit.c b/src/backenddb/select_unit.c @@ -94,8 +94,11 @@ TALER_MERCHANTDB_select_unit ( " ,bu.unit_name_long_i18n" " ,bu.unit_name_short_i18n" " ,COALESCE(bo.override_allow_fraction, bu.unit_allow_fraction)" + " AS unit_allow_fraction" " ,COALESCE(bo.override_precision_level, bu.unit_precision_level)" + " AS unit_precision_level" " ,COALESCE(bo.override_active, bu.unit_active)" + " AS unit_active" " ,TRUE AS unit_builtin" " FROM merchant.merchant_builtin_units bu" " LEFT JOIN merchant_builtin_unit_overrides bo" diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c @@ -46,7 +46,7 @@ * commands should NOT wait for this timeout! */ #define POLL_ORDER_TIMEOUT \ - GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60) + GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 60) /** * The 'poll-orders-conclude-1x' and other 'conclude' @@ -54,7 +54,7 @@ * here we use a short value! */ #define POLL_ORDER_SHORT_TIMEOUT \ - GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2) + GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 2) /** * Configuration file we use. One (big) configuration is used @@ -285,8 +285,8 @@ cmd_exec_wirewatch (const char *label) * @param label label to use for the command. */ #define CMD_EXEC_AGGREGATOR(label) \ - TALER_TESTING_cmd_exec_aggregator (label "-aggregator", config_file), \ - TALER_TESTING_cmd_exec_transfer (label "-transfer", config_file) + TALER_TESTING_cmd_exec_aggregator (label "-aggregator", config_file), \ + TALER_TESTING_cmd_exec_transfer (label "-transfer", config_file) /** @@ -750,6 +750,20 @@ run (void *cls, "a product", "EUR:1", MHD_HTTP_NO_CONTENT), + TALER_TESTING_cmd_merchant_post_products2 ("post-product-piece", + merchant_url, + "product-piece", + "a product sold by piece", + NULL, + "Piece", + "EUR:1", + "", + NULL, + 4, + 0, + NULL, + GNUNET_TIME_UNIT_ZERO_TS, + MHD_HTTP_NO_CONTENT), TALER_TESTING_cmd_merchant_post_products_with_unit_prices ( "post-products-dup-currency", merchant_url,