summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-07-30 15:23:44 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-07-30 15:23:44 +0530
commit54edea47b8859f99b9733f81ceba0f5803c07122 (patch)
treeb7c4218788316e0d9c50a9721a5b10dea57ce90b /src
parent5bdbbd68c4e11a322fe5c1b92c5ccc962863dbb1 (diff)
downloadmerchant-54edea47b8859f99b9733f81ceba0f5803c07122.tar.gz
merchant-54edea47b8859f99b9733f81ceba0f5803c07122.tar.bz2
merchant-54edea47b8859f99b9733f81ceba0f5803c07122.zip
add claim token to taler pay URI
Diffstat (limited to 'src')
-rw-r--r--src/backend/taler-merchant-httpd_get-orders-ID.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/backend/taler-merchant-httpd_get-orders-ID.c b/src/backend/taler-merchant-httpd_get-orders-ID.c
index a6912b79..6cfcfbce 100644
--- a/src/backend/taler-merchant-httpd_get-orders-ID.c
+++ b/src/backend/taler-merchant-httpd_get-orders-ID.c
@@ -626,13 +626,15 @@ suspend_god (struct GetOrderData *god)
* @param order_id the order id
* @param session_id session, may be NULL
* @param instance_id instance, may be "default"
+ * @param claim_token claim token for the order, may be NULL
* @return corresponding taler://pay/ URI, or NULL on missing "host"
*/
char *
TMH_make_taler_pay_uri (struct MHD_Connection *con,
const char *order_id,
const char *session_id,
- const char *instance_id)
+ const char *instance_id,
+ struct TALER_ClaimTokenP *claim_token)
{
const char *host;
const char *forwarded_host;
@@ -686,6 +688,14 @@ TMH_make_taler_pay_uri (struct MHD_Connection *con,
order_id);
GNUNET_buffer_write_path (&buf,
(session_id == NULL) ? "" : session_id);
+ if (GNUNET_NO == GNUNET_is_zero (claim_token))
+ {
+ GNUNET_buffer_write_str (&buf,
+ "&c=");
+ GNUNET_buffer_write_data_encoded (&buf,
+ claim_token,
+ sizeof (struct TALER_ClaimTokenP));
+ }
return GNUNET_buffer_reap_str (&buf);
}