[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: api update, not fully implemente
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: api update, not fully implemented |
Date: |
Sat, 09 Nov 2019 13:06:24 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new e095f81 api update, not fully implemented
e095f81 is described below
commit e095f81c0acf1ae21874eb50936b30111fefef89
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Nov 9 13:06:21 2019 +0100
api update, not fully implemented
---
src/include/taler_merchant_service.h | 6 +++++-
src/lib/merchant_api_check_payment.c | 5 +++++
src/lib/testing_api_cmd_check_payment.c | 19 +++++++------------
src/merchant-tools/taler-merchant-benchmark.c | 5 ++++-
4 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/src/include/taler_merchant_service.h
b/src/include/taler_merchant_service.h
index 1d424f2..0e36b98 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -28,7 +28,6 @@
#include <gnunet/gnunet_curl_lib.h>
#include <jansson.h>
-#define APIKEY_SANDBOX "Authorization: ApiKey sandbox"
/* ********************* /refund ************************** */
@@ -987,6 +986,10 @@ typedef void
* @param backend_url base URL of the merchant backend
* @param order_id order id to identify the payment
* @parem session_id sesion id for the payment (or NULL if the payment is not
bound to a session)
+ * @param timeout timeout to use in long polling (how long may the server wait
to reply
+ * before generating an unpaid response). Note that this is just
provided to
+ * the server, we as client will block until the response comes back or
until
+ * #TALER_MERCHANT_check_payment_cancel() is called.
* @param check_payment_cb callback which will work the response gotten from
the backend
* @param check_payment_cb_cls closure to pass to @a check_payment_cb
* @return handle for this operation, NULL upon errors
@@ -996,6 +999,7 @@ TALER_MERCHANT_check_payment (struct GNUNET_CURL_Context
*ctx,
const char *backend_url,
const char *order_id,
const char *session_id,
+ struct GNUNET_TIME_Relative timeout,
TALER_MERCHANT_CheckPaymentCallback
check_payment_cb,
void *check_payment_cls);
diff --git a/src/lib/merchant_api_check_payment.c
b/src/lib/merchant_api_check_payment.c
index 35cd44c..fe38a18 100644
--- a/src/lib/merchant_api_check_payment.c
+++ b/src/lib/merchant_api_check_payment.c
@@ -178,6 +178,10 @@ handle_check_payment_finished (void *cls,
* @param backend_url base URL of the merchant backend
* @param order_id order id to identify the payment
* @parem session_id sesion id for the payment (or NULL if the payment is not
bound to a session)
+ * @param timeout timeout to use in long polling (how long may the server wait
to reply
+ * before generating an unpaid response). Note that this is just
provided to
+ * the server, we as client will block until the response comes back or
until
+ * #TALER_MERCHANT_poll_payment_cancel() is called.
* @param check_payment_cb callback which will work the response gotten from
the backend
* @param check_payment_cb_cls closure to pass to @a check_payment_cb
* @return handle for this operation, NULL upon errors
@@ -187,6 +191,7 @@ TALER_MERCHANT_check_payment (struct GNUNET_CURL_Context
*ctx,
const char *backend_url,
const char *order_id,
const char *session_id,
+ struct GNUNET_TIME_Relative timeout,
TALER_MERCHANT_CheckPaymentCallback
check_payment_cb,
void *check_payment_cb_cls)
diff --git a/src/lib/testing_api_cmd_check_payment.c
b/src/lib/testing_api_cmd_check_payment.c
index e74dbd1..a942c58 100644
--- a/src/lib/testing_api_cmd_check_payment.c
+++ b/src/lib/testing_api_cmd_check_payment.c
@@ -162,26 +162,21 @@ check_payment_run (void *cls,
cps->is = is;
proposal_cmd = TALER_TESTING_interpreter_lookup_command (
is, cps->proposal_reference);
-
if (NULL == proposal_cmd)
TALER_TESTING_FAIL (is);
-
if (GNUNET_OK != TALER_TESTING_get_trait_order_id (
proposal_cmd, 0, &order_id))
TALER_TESTING_FAIL (is);
-
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Checking for order id `%s'\n",
order_id);
-
- cps->cpo = TALER_MERCHANT_check_payment
- (is->ctx,
- cps->merchant_url,
- order_id,
- NULL,
- check_payment_cb,
- cps);
-
+ cps->cpo = TALER_MERCHANT_check_payment (is->ctx,
+ cps->merchant_url,
+ order_id,
+ NULL,
+ GNUNET_TIME_UNIT_ZERO,
+ check_payment_cb,
+ cps);
GNUNET_assert (NULL != cps->cpo);
}
diff --git a/src/merchant-tools/taler-merchant-benchmark.c
b/src/merchant-tools/taler-merchant-benchmark.c
index dedcc22..49c3cdd 100644
--- a/src/merchant-tools/taler-merchant-benchmark.c
+++ b/src/merchant-tools/taler-merchant-benchmark.c
@@ -23,7 +23,6 @@
* communication with the exchange
* @author Marcello Stanisci
*/
-
#include "platform.h"
#include <taler/taler_util.h>
#include <taler/taler_signatures.h>
@@ -38,6 +37,10 @@
#include <taler/taler_error_codes.h>
#include "taler_merchant_testing_lib.h"
+
+#define APIKEY_SANDBOX "Authorization: ApiKey sandbox"
+
+
/* Error codes. */
enum PaymentGeneratorError
{
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: api update, not fully implemented,
gnunet <=