gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] branch master updated: add await_refund_obtained option


From: gnunet
Subject: [taler-merchant] branch master updated: add await_refund_obtained option to GET /orders/ in merchant lib
Date: Mon, 10 Aug 2020 22:31:19 +0200

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

jonathan-buchanan pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 050de4d  add await_refund_obtained option to GET /orders/ in merchant 
lib
050de4d is described below

commit 050de4d39ca58446b02887bf5770864589e788cb
Author: Jonathan Buchanan <jonathan.russ.buchanan@gmail.com>
AuthorDate: Mon Aug 10 16:31:06 2020 -0400

    add await_refund_obtained option to GET /orders/ in merchant lib
---
 src/include/taler_merchant_service.h           | 3 +++
 src/lib/merchant_api_wallet_get_order.c        | 9 +++++++++
 src/testing/testing_api_cmd_wallet_get_order.c | 1 +
 3 files changed, 13 insertions(+)

diff --git a/src/include/taler_merchant_service.h 
b/src/include/taler_merchant_service.h
index 17d0f16..46d14ea 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -1549,6 +1549,8 @@ typedef void
  * @param min_refund long poll for the service to approve a refund exceeding 
this value;
  *        use NULL to not wait for any refund (only for payment). Only makes 
sense
  *        with a non-zero @a timeout. Can be NULL.
+ * @param await_refund_obtained long poll for the order's refunds to be
+ *        picked up by the wallet.
  * @param cb callback which will work the response gotten from the backend
  * @param cb_cls closure to pass to @a cb
  * @return handle for this operation, NULL upon errors
@@ -1561,6 +1563,7 @@ TALER_MERCHANT_wallet_order_get (struct 
GNUNET_CURL_Context *ctx,
                                  struct GNUNET_TIME_Relative timeout,
                                  const char *session_id,
                                  const struct TALER_Amount *min_refund,
+                                 bool await_refund_obtained,
                                  TALER_MERCHANT_OrderWalletGetCallback cb,
                                  void *cb_cls);
 
diff --git a/src/lib/merchant_api_wallet_get_order.c 
b/src/lib/merchant_api_wallet_get_order.c
index 7f6b1ed..7bfdf70 100644
--- a/src/lib/merchant_api_wallet_get_order.c
+++ b/src/lib/merchant_api_wallet_get_order.c
@@ -381,6 +381,8 @@ handle_wallet_get_order_finished (void *cls,
  * @param min_refund long poll for the service to approve a refund exceeding 
this value;
  *        use NULL to not wait for any refund (only for payment). Only makes 
sense
  *        with a non-zero @a timeout. Can be NULL.
+ * @param await_refund_obtained long poll for the order's refunds to be
+ *        picked up by the wallet.
  * @param cb callback which will work the response gotten from the backend
  * @param cb_cls closure to pass to @a cb
  * @return handle for this operation, NULL upon errors
@@ -393,6 +395,7 @@ TALER_MERCHANT_wallet_order_get (struct GNUNET_CURL_Context 
*ctx,
                                  struct GNUNET_TIME_Relative timeout,
                                  const char *session_id,
                                  const struct TALER_Amount *min_refund,
+                                 bool await_refund_obtained,
                                  TALER_MERCHANT_OrderWalletGetCallback cb,
                                  void *cb_cls)
 {
@@ -444,6 +447,12 @@ TALER_MERCHANT_wallet_order_get (struct 
GNUNET_CURL_Context *ctx,
                                 (NULL != min_refund)
                                 ? TALER_amount2s (min_refund)
                                 : NULL,
+                                await_refund_obtained
+                                ? "await_refund_obtained"
+                                : NULL,
+                                await_refund_obtained
+                                ? "yes"
+                                : NULL,
                                 NULL);
     GNUNET_free (path);
   }
diff --git a/src/testing/testing_api_cmd_wallet_get_order.c 
b/src/testing/testing_api_cmd_wallet_get_order.c
index 76d620f..3ebeda4 100644
--- a/src/testing/testing_api_cmd_wallet_get_order.c
+++ b/src/testing/testing_api_cmd_wallet_get_order.c
@@ -301,6 +301,7 @@ wallet_get_order_run (void *cls,
                                               GNUNET_TIME_UNIT_ZERO,
                                               NULL,
                                               NULL,
+                                              false,
                                               &wallet_get_order_cb,
                                               gos);
 }

-- 
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]