From f2f81bf4d5c79a7eb15a304c26b0a8595672c432 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 7 Sep 2020 11:28:33 +0530 Subject: consider already_paid_order_id on order status page Also add already_paid_fulfillment_url for the storefront. --- src/backend/taler-merchant-httpd_get-orders-ID.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src') diff --git a/src/backend/taler-merchant-httpd_get-orders-ID.c b/src/backend/taler-merchant-httpd_get-orders-ID.c index 90f42b7e..4f77fba4 100644 --- a/src/backend/taler-merchant-httpd_get-orders-ID.c +++ b/src/backend/taler-merchant-httpd_get-orders-ID.c @@ -525,6 +525,30 @@ send_pay_request (struct GetOrderData *god, { char *qr; + if ( (NULL != already_paid_order_id) && (NULL != god->fulfillment_url) ) + { + struct MHD_Response *reply; + MHD_RESULT ret; + + reply = MHD_create_response_from_buffer (0, + NULL, + MHD_RESPMEM_PERSISTENT); + if (NULL == reply) + { + GNUNET_break (0); + return MHD_NO; + } + GNUNET_break (MHD_YES == + MHD_add_response_header (reply, + MHD_HTTP_HEADER_LOCATION, + god->fulfillment_url)); + ret = MHD_queue_response (god->sc.con, + MHD_HTTP_FOUND, + reply); + MHD_destroy_response (reply); + return ret; + } + qr = TMH_create_qrcode (taler_pay_uri); if (NULL == qr) { -- cgit v1.2.3