[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] branch master updated: add /refund cancel
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] branch master updated: add /refund cancel function |
Date: |
Mon, 19 Jun 2017 11:36:49 +0200 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 80434f9 add /refund cancel function
80434f9 is described below
commit 80434f9f0ad5fb51e2713e1c122ad5646599cb9c
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Jun 19 11:36:57 2017 +0200
add /refund cancel function
---
src/include/taler_merchant_service.h | 8 ++++++++
src/lib/merchant_api_proposal.c | 2 +-
src/lib/merchant_api_refund.c | 18 ++++++++++++++++++
3 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/src/include/taler_merchant_service.h
b/src/include/taler_merchant_service.h
index 15287c5..84fc04b 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -645,4 +645,12 @@ TALER_MERCHANT_refund_increase (struct GNUNET_CURL_Context
*ctx,
TALER_MERCHANT_RefundIncreaseCallback cb,
void *cb_cls);
+/**
+ * Cancel a POST /refund request.
+ *
+ * @param rio the refund increasing operation to cancel
+ */
+void
+TALER_MERCHANT_refund_increase_cancel (struct
TALER_MERCHANT_RefundIncreaseOperation *rio);
+
#endif /* _TALER_MERCHANT_SERVICE_H */
diff --git a/src/lib/merchant_api_proposal.c b/src/lib/merchant_api_proposal.c
index d262fff..1e340df 100644
--- a/src/lib/merchant_api_proposal.c
+++ b/src/lib/merchant_api_proposal.c
@@ -337,7 +337,7 @@ TALER_MERCHANT_proposal_lookup (struct GNUNET_CURL_Context
*ctx,
/**
- * Cancel a PUT /proposal request. This function cannot be used
+ * Cancel a POST /proposal request. This function cannot be used
* on a request handle if a response is already served for it.
*
* @param po the proposal operation request handle
diff --git a/src/lib/merchant_api_refund.c b/src/lib/merchant_api_refund.c
index 126dda6..4f2a8c1 100644
--- a/src/lib/merchant_api_refund.c
+++ b/src/lib/merchant_api_refund.c
@@ -82,6 +82,24 @@ handle_refund_increase_finished (void *cls,
}
/**
+ * Cancel a POST /refund request.
+ *
+ * @param rio the refund increasing operation to cancel
+ */
+void
+TALER_MERCHANT_refund_increase_cancel (struct
TALER_MERCHANT_RefundIncreaseOperation *rio)
+{
+ if (NULL != rio->job)
+ {
+ GNUNET_CURL_job_cancel (rio->job);
+ rio->job = NULL;
+ }
+ GNUNET_free (rio->url);
+ GNUNET_free (rio->json_enc);
+ GNUNET_free (rio);
+}
+
+/**
* Increase the refund associated to a order
*
* @param ctx the CURL context used to connect to the backend
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-merchant] branch master updated: add /refund cancel function,
gnunet <=