gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-mdb] 02/02: adapt to merchant API change


From: gnunet
Subject: [taler-taler-mdb] 02/02: adapt to merchant API change
Date: Fri, 30 Oct 2020 17:05:02 +0100

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

grothoff pushed a commit to branch master
in repository taler-mdb.

commit 9ef5d9cf5fe2dbceaddc557c540f716448cd264e
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Oct 30 17:03:52 2020 +0100

    adapt to merchant API change
---
 src/main.c | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/src/main.c b/src/main.c
index 8ba9367..bf9a7eb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1478,27 +1478,24 @@ check_payment_again (void *cls)
  * @brief Callback for a POST /orders request
  *
  * @param cls closure
- * @param hr HTTP response for this request
- * @param order_id order ID of the order created
- * @param token the claim token generated by the merchant (NULL if
- *        it wasn't generated).
+ * @param por response for this request
  */
 static void
 proposal_cb (void *cls,
-             const struct TALER_MERCHANT_HttpResponse *hr,
-             const char *order_id,
-             const struct TALER_ClaimTokenP *token)
+             const struct TALER_MERCHANT_PostOrdersReply *por)
 {
   struct PaymentActivity *pa = cls;
 
   pa->po = NULL;
-  if (MHD_HTTP_OK != hr->http_status)
+  if (MHD_HTTP_OK != por->hr.http_status)
   {
+    /* FIXME: In the future, we may want to support MHD_HTTP_GONE
+       explicitly and show 'product out of stock' here! */
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Failed to setup order with backend: %u/%d\n",
-                hr->http_status,
-                (int) hr->ec);
-    json_dumpf (hr->reply,
+                por->hr.http_status,
+                (int) por->hr.ec);
+    json_dumpf (por->hr.reply,
                 stderr,
                 0);
     mdb.cmd = &cmd_reader_display_backend_not_reachable;
@@ -1510,8 +1507,8 @@ proposal_cb (void *cls,
   }
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Backend successfully created order `%s'\n",
-              order_id);
-  pa->order_id = GNUNET_strdup (order_id);
+              por->details.ok.order_id);
+  pa->order_id = GNUNET_strdup (por->details.ok.order_id);
   pa->ogh = TALER_MERCHANT_merchant_order_get (ctx,
                                                pa->base_url,
                                                pa->order_id,
@@ -1524,7 +1521,7 @@ proposal_cb (void *cls,
 
 
 static void
-start_read_cancel_button ();
+start_read_cancel_button (void);
 
 /**
  * @brief Launch a new order

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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