merchant

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

commit 536122c4f13052438fdb170184c10015b6e69d4c
parent 4761845471b9df042bc9823197a26c6851a6b302
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 13 Jan 2024 23:14:18 +0100

-add assertions

Diffstat:
Msrc/backend/taler-merchant-httpd_private-get-orders-ID.c | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_private-get-orders-ID.c b/src/backend/taler-merchant-httpd_private-get-orders-ID.c @@ -608,6 +608,10 @@ phase_fetch_contract (struct GetOrderRequestContext *gorc) &gorc->wired, &gorc->paid_session_matches, &gorc->claim_token); + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "lookup_contract_terms (%s) returned %d\n", + hc->infix, + (int) qs); if (0 > qs) { /* single, read-only SQL statements should never cause @@ -624,6 +628,10 @@ phase_fetch_contract (struct GetOrderRequestContext *gorc) } if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT == qs) { + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Order %s is %s (%s) according to database\n", + gorc->paid ? "paid" : "unpaid", + gorc->wire ? "wired" : "unwired"); gorc->phase++; return; } @@ -743,6 +751,8 @@ phase_check_paid (struct GetOrderRequestContext *gorc) GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Order %s unclaimed, no need to lookup payment status\n", hc->infix); + GNUNET_assert (! gorc->paid); + GNUNET_assert (! gorc->wired); gorc->phase++; return; }