diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-08-30 15:23:57 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-08-30 15:23:57 +0200 |
commit | 09b3d97746973387ff5594285e77dd5bf5235eb4 (patch) | |
tree | 1a1cb804195d5f50801ebf6a1a5fd00b78a73627 | |
parent | 821c9b0f70ade602613560bca64325960955e4d6 (diff) | |
download | merchant-09b3d97746973387ff5594285e77dd5bf5235eb4.tar.gz merchant-09b3d97746973387ff5594285e77dd5bf5235eb4.tar.bz2 merchant-09b3d97746973387ff5594285e77dd5bf5235eb4.zip |
include tip expiration timestamp
-rw-r--r-- | src/backend/taler-merchant-httpd_tip-pickup.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/backend/taler-merchant-httpd_tip-pickup.c b/src/backend/taler-merchant-httpd_tip-pickup.c index 0f1a2cab..eba99e38 100644 --- a/src/backend/taler-merchant-httpd_tip-pickup.c +++ b/src/backend/taler-merchant-httpd_tip-pickup.c @@ -626,6 +626,7 @@ MH_handler_tip_pickup_get (struct TMH_RequestHandler *rh, struct TALER_Amount tip_amount; struct TALER_Amount tip_amount_left; struct GNUNET_TIME_Absolute timestamp; + struct GNUNET_TIME_Absolute timestamp_expire; int ret; int qs; @@ -701,13 +702,17 @@ MH_handler_tip_pickup_get (struct TMH_RequestHandler *rh, ec, "Could not determine exchange URL for the given tip id"); } + + timestamp_expire = GNUNET_TIME_absolute_add (timestamp, GNUNET_TIME_UNIT_DAYS); + ret = TMH_RESPONSE_reply_json_pack (connection, MHD_HTTP_OK, - "{s:s, s:o, s:o, s:o, s:o}", + "{s:s, s:o, s:o, s:o, s:o, s:o}", "exchange_url", exchange_url, "amount", TALER_JSON_from_amount (&tip_amount), "amount_left", TALER_JSON_from_amount (&tip_amount_left), "stamp_created", GNUNET_JSON_from_time_abs (timestamp), + "stamp_expire", GNUNET_JSON_from_time_abs (timestamp_expire), "extra", extra); GNUNET_free (exchange_url); |