merchant

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

commit f2f81bf4d5c79a7eb15a304c26b0a8595672c432
parent f58fd14035cd10fff43ce08e79109438928d03b8
Author: Florian Dold <florian.dold@gmail.com>
Date:   Mon,  7 Sep 2020 11:28:33 +0530

consider already_paid_order_id on order status page

Also add already_paid_fulfillment_url for the storefront.

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

diff --git 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) {