diff options
Diffstat (limited to 'src/backend/taler-merchant-httpd_get-orders-ID.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_get-orders-ID.c | 18 |
1 files changed, 18 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 index ffc9ac07..8532c983 100644 --- a/src/backend/taler-merchant-httpd_get-orders-ID.c +++ b/src/backend/taler-merchant-httpd_get-orders-ID.c @@ -376,6 +376,7 @@ make_taler_refund_uri (struct MHD_Connection *con, * * @param con HTTP connection * @param order_id the order id + * @param session_id the session id * @param instance_id instance, may be "default" * @param claim_token claim token for the order, may be NULL * @return corresponding http(s):// URL, or NULL on missing "host" @@ -383,6 +384,7 @@ make_taler_refund_uri (struct MHD_Connection *con, char * TMH_make_order_status_url (struct MHD_Connection *con, const char *order_id, + const char *session_id, const char *instance_id, struct TALER_ClaimTokenP *claim_token) { @@ -390,6 +392,7 @@ TMH_make_order_status_url (struct MHD_Connection *con, const char *forwarded_host; const char *uri_path; struct GNUNET_Buffer buf = { 0 }; + bool have_claim_token = false; host = MHD_lookup_connection_value (con, MHD_HEADER_KIND, @@ -445,6 +448,20 @@ TMH_make_order_status_url (struct MHD_Connection *con, GNUNET_buffer_write_data_encoded (&buf, (char *) claim_token, sizeof (struct TALER_ClaimTokenP)); + have_claim_token = true; + } + + if (NULL != session_id) + { + if (have_claim_token) + GNUNET_buffer_write_str (&buf, + "?session_id="); + else + GNUNET_buffer_write_str (&buf, + "&session_id="); + GNUNET_buffer_write_str (&buf, + session_id); + } return GNUNET_buffer_reap_str (&buf); @@ -572,6 +589,7 @@ send_pay_request (struct GetOrderData *god, &god->claim_token); order_status_url = TMH_make_order_status_url (god->sc.con, god->order_id, + god->session_id, god->hc->instance->settings.id, &god->claim_token); if (god->generate_html) |