From 46cf325dce873a6e85ad1b666521308b2c008c48 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 10 Sep 2020 00:12:34 +0200 Subject: redo more of transaction on resume --- .../taler-merchant-httpd_private-get-orders-ID.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/backend/taler-merchant-httpd_private-get-orders-ID.c') diff --git a/src/backend/taler-merchant-httpd_private-get-orders-ID.c b/src/backend/taler-merchant-httpd_private-get-orders-ID.c index d3413614..8e273ad0 100644 --- a/src/backend/taler-merchant-httpd_private-get-orders-ID.c +++ b/src/backend/taler-merchant-httpd_private-get-orders-ID.c @@ -811,12 +811,15 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh, "yes")) ) gorc->transfer_status_requested = true; } - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "Starting GET /private/orders/%s processing with timeout %s\n", - hc->infix, - GNUNET_STRINGS_absolute_time_to_string ( - gorc->sc.long_poll_timeout)); + } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Starting GET /private/orders/%s processing with timeout %s\n", + hc->infix, + GNUNET_STRINGS_absolute_time_to_string ( + gorc->sc.long_poll_timeout)); + if (NULL == gorc->contract_terms) + { TMH_db->preflight (TMH_db->cls); qs = TMH_db->lookup_contract_terms (TMH_db->cls, hc->instance->settings.id, @@ -855,7 +858,6 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh, TALER_EC_GET_ORDERS_ORDER_NOT_FOUND, hc->infix); } - /* extract the fulfillment URL and total amount from the contract terms! */ { struct GNUNET_JSON_Specification spec[] = { @@ -891,7 +893,6 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh, gorc->fulfillment_url = json_string_value (json_object_get (gorc->contract_terms, "fulfillment_url")); - if (! order_only) { if (GNUNET_OK != @@ -969,6 +970,9 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh, char *order_status_url; MHD_RESULT ret; + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Found already paid order %s\n", + already_paid_order_id); taler_pay_uri = TMH_make_taler_pay_uri (connection, hc->infix, gorc->session_id, -- cgit v1.2.3