diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-10-02 20:20:08 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-10-02 20:20:20 +0200 |
commit | e24064063f5d7dc36ab14e1f911708e6d981a10e (patch) | |
tree | 0c46d0fe2e8f6401eef0c40256d0c434fc00c1f5 /src/backend/taler-merchant-httpd_private-get-orders-ID.c | |
parent | fc51e020796e4faa5435520adb5e3ca67ee6105f (diff) | |
download | merchant-e24064063f5d7dc36ab14e1f911708e6d981a10e.tar.gz merchant-e24064063f5d7dc36ab14e1f911708e6d981a10e.tar.bz2 merchant-e24064063f5d7dc36ab14e1f911708e6d981a10e.zip |
implement #6616 claim status in /private/orders/ID handler
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-get-orders-ID.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-get-orders-ID.c | 15 |
1 files changed, 14 insertions, 1 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 index d95f43d7..dbb573e7 100644 --- a/src/backend/taler-merchant-httpd_private-get-orders-ID.c +++ b/src/backend/taler-merchant-httpd_private-get-orders-ID.c @@ -1044,7 +1044,20 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh, gorc->session_id, gorc->fulfillment_url); } - + if ( (! paid) && + (! order_only) ) + { + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, + "Order %s claimed but not paid yet\n", + hc->infix); + return TALER_MHD_reply_json_pack (connection, + MHD_HTTP_OK, + "{s:O, s:s}", + "contract_terms", + gorc->contract_terms, + "order_status", + "claimed"); + } if (paid && (! wired) && gorc->transfer_status_requested) |