merchant

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

commit 633a0b329a3f023023b4de1d4ceccdc7d541fc9a
parent 60634bb994a98c2d4d3552c39dbf52832e670788
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Fri, 10 Jul 2026 09:51:43 +0200

only accumulate amounts of paid orders

Diffstat:
Msrc/backend/taler-merchant-httpd_get-private-orders.c | 12+++---------
1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_get-private-orders.c b/src/backend/taler-merchant-httpd_get-private-orders.c @@ -700,8 +700,9 @@ add_order (void *cls, GNUNET_assert (choice_index < contract->pc->details.v1.choices_len); amount = &choice->amount; /* Accumulate order total */ - accumulate_total (po, - amount); + if (paid) + accumulate_total (po, + amount); if (TALER_EC_NONE != po->result) goto cleanup; /* Accumulate refund totals (only meaningful for paid orders) */ @@ -716,14 +717,7 @@ add_order (void *cls, } else { - struct TALER_MERCHANT_OrderChoice *choice - = &order->details.v1.choices[choice_index]; - GNUNET_assert (choice_index < order->details.v1.choices_len); - amount = &choice->amount; - /* Accumulate order total */ - accumulate_total (po, - amount); if (TALER_EC_NONE != po->result) goto cleanup; }