From 7891e62bf98bd884c8c993ae698f9a985dbacfbd Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 16 Dec 2023 17:54:16 +0800 Subject: partial implementation of protocol v6: GET with additional filters, POST not done --- src/backend/taler-merchant-httpd_config.c | 4 ++-- src/backend/taler-merchant-httpd_private-get-orders.c | 8 ++++++++ src/backend/taler-merchant-httpd_private-post-orders.c | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src/backend') diff --git a/src/backend/taler-merchant-httpd_config.c b/src/backend/taler-merchant-httpd_config.c index f1075ff5..448b3dec 100644 --- a/src/backend/taler-merchant-httpd_config.c +++ b/src/backend/taler-merchant-httpd_config.c @@ -1,6 +1,6 @@ /* This file is part of TALER - (C) 2019, 2020, 2021 Taler Systems SA + (C) 2019, 2020, 2021, 2023 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software @@ -42,7 +42,7 @@ * #MERCHANT_PROTOCOL_CURRENT and #MERCHANT_PROTOCOL_AGE in * merchant_api_config.c! */ -#define MERCHANT_PROTOCOL_VERSION "5:0:1" +#define MERCHANT_PROTOCOL_VERSION "6:0:2" MHD_RESULT diff --git a/src/backend/taler-merchant-httpd_private-get-orders.c b/src/backend/taler-merchant-httpd_private-get-orders.c index b55a5552..e4f120f4 100644 --- a/src/backend/taler-merchant-httpd_private-get-orders.c +++ b/src/backend/taler-merchant-httpd_private-get-orders.c @@ -809,6 +809,14 @@ TMH_private_get_orders (const struct TMH_RequestHandler *rh, } } } + po->of.session_id + = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "session_id"); + po->of.fulfillment_url + = MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "fulfillment_url"); TALER_MHD_parse_request_timeout (connection, &po->long_poll_timeout); if (GNUNET_TIME_absolute_is_never (po->long_poll_timeout)) diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c index 11b9abcd..31b99536 100644 --- a/src/backend/taler-merchant-httpd_private-post-orders.c +++ b/src/backend/taler-merchant-httpd_private-post-orders.c @@ -462,6 +462,7 @@ execute_transaction (struct OrderContext *oc) qs = TMH_db->insert_order (TMH_db->cls, oc->hc->instance->settings.id, oc->order_id, + NULL /* session ID! FIXME: protocol v6! */, &oc->h_post_data, oc->pay_deadline, &oc->claim_token, -- cgit v1.2.3