gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant] branch master updated: make next_url manda


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: make next_url mandatory
Date: Mon, 11 Dec 2017 17:42:24 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new dbd76fb  make next_url mandatory
dbd76fb is described below

commit dbd76fbf5fe25cf1653ab637c5fdcaa83c7e923e
Author: Florian Dold <address@hidden>
AuthorDate: Mon Dec 11 17:38:14 2017 +0100

    make next_url mandatory
---
 src/backend/taler-merchant-httpd_tip-authorize.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_tip-authorize.c 
b/src/backend/taler-merchant-httpd_tip-authorize.c
index 7031413..c55b41b 100644
--- a/src/backend/taler-merchant-httpd_tip-authorize.c
+++ b/src/backend/taler-merchant-httpd_tip-authorize.c
@@ -87,11 +87,13 @@ MH_handler_tip_authorize (struct TMH_RequestHandler *rh,
   const char *instance;
   const char *justification;
   const char *pickup_url;
+  const char *next_url;
   struct GNUNET_JSON_Specification spec[] = {
     TALER_JSON_spec_amount ("amount", &amount),
     GNUNET_JSON_spec_string ("instance", &instance),
     GNUNET_JSON_spec_string ("justification", &justification),
     GNUNET_JSON_spec_string ("pickup_url", &pickup_url),
+    GNUNET_JSON_spec_string ("next_url", &next_url),
     GNUNET_JSON_spec_end()
   };
   json_t *root;
@@ -200,15 +202,13 @@ MH_handler_tip_authorize (struct TMH_RequestHandler *rh,
                                   TALER_EC_TIP_AUTHORIZE_INSUFFICIENT_FUNDS,
                                   "Insufficient funds for tip");
   }
-  json_t *tip_token = json_pack ("{s:o, s:o, s:o, s:s, s:s}",
+  json_t *tip_token = json_pack ("{s:o, s:o, s:o, s:s, s:s, s:s}",
                                  "tip_id", GNUNET_JSON_from_data_auto 
(&tip_id),
                                  "expiration", GNUNET_JSON_from_time_abs 
(expiration),
                                  "amount", TALER_JSON_from_amount (&amount),
                                  "exchange_url", mi->tip_exchange,
+                                 "next_url", next_url,
                                  "pickup_url", pickup_url);
-  json_t *next_url = json_object_get (root, "next_url");
-  if (json_is_string (next_url))
-    json_object_set (tip_token, "next_url", next_url);
   char *tip_token_str = json_dumps (tip_token,  JSON_ENSURE_ASCII | 
JSON_COMPACT);
   json_decref (tip_token);
   json_decref (root);

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]