[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] branch master updated: fix bug in testcase
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] branch master updated: fix bug in testcase (and API) introduced when next_url and pickup_url were added to the spec |
Date: |
Wed, 13 Dec 2017 22:18:50 +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 015dd3a fix bug in testcase (and API) introduced when next_url and
pickup_url were added to the spec
015dd3a is described below
commit 015dd3aebfdea6d090cc07bb3c7586aadff83465
Author: Christian Grothoff <address@hidden>
AuthorDate: Wed Dec 13 22:18:47 2017 +0100
fix bug in testcase (and API) introduced when next_url and pickup_url were
added to the spec
---
src/include/taler_merchant_service.h | 8 ++++++--
src/lib/merchant_api_tip_authorize.c | 14 ++++++++++----
src/lib/test_merchant_api.c | 2 ++
3 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/src/include/taler_merchant_service.h
b/src/include/taler_merchant_service.h
index 0b739d6..a1ee0dd 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -808,7 +808,9 @@ typedef void
* that a tip should be created.
*
* @param ctx execution context
- * @param backend_uri base URL of the merchant backend
+ * @param backend_url base URL of the merchant backend
+ * @param pickup_url frontend URL for where the tip can be picked up
+ * @param next_url where the browser should proceed after picking up the tip
* @param amount amount to be handed out as a tip
* @param instance which backend instance should create the tip (identifies
the reserve and exchange)
* @param justification which justification should be stored (human-readable
reason for the tip)
@@ -818,7 +820,9 @@ typedef void
*/
struct TALER_MERCHANT_TipAuthorizeOperation *
TALER_MERCHANT_tip_authorize (struct GNUNET_CURL_Context *ctx,
- const char *backend_uri,
+ const char *backend_url,
+ const char *pickup_url,
+ const char *next_url,
const struct TALER_Amount *amount,
const char *instance,
const char *justification,
diff --git a/src/lib/merchant_api_tip_authorize.c
b/src/lib/merchant_api_tip_authorize.c
index 3c7899d..a7aa4f5 100644
--- a/src/lib/merchant_api_tip_authorize.c
+++ b/src/lib/merchant_api_tip_authorize.c
@@ -174,7 +174,9 @@ handle_tip_authorize_finished (void *cls,
* that a tip should be created.
*
* @param ctx execution context
- * @param backend_uri base URL of the merchant backend
+ * @param backend_url base URL of the merchant backend
+ * @param pickup_url frontend URL for where the tip can be picked up
+ * @param next_url where the browser should proceed after picking up the tip
* @param amount amount to be handed out as a tip
* @param instance which backend instance should create the tip (identifies
the reserve and exchange)
* @param justification which justification should be stored (human-readable
reason for the tip)
@@ -184,7 +186,9 @@ handle_tip_authorize_finished (void *cls,
*/
struct TALER_MERCHANT_TipAuthorizeOperation *
TALER_MERCHANT_tip_authorize (struct GNUNET_CURL_Context *ctx,
- const char *backend_uri,
+ const char *backend_url,
+ const char *pickup_url,
+ const char *next_url,
const struct TALER_Amount *amount,
const char *instance,
const char *justification,
@@ -199,18 +203,20 @@ TALER_MERCHANT_tip_authorize (struct GNUNET_CURL_Context
*ctx,
tao->ctx = ctx;
tao->cb = authorize_cb;
tao->cb_cls = authorize_cb_cls;
- tao->url = MAH_path_to_url_ (backend_uri,
+ tao->url = MAH_path_to_url_ (backend_url,
"/tip-authorize");
te_obj = json_pack ("{"
" s:o," /* amount */
" s:s," /* instance */
" s:s," /* justification */
" s:s," /* pickup_url */
+ " s:s," /* next_url */
"}",
"amount", TALER_JSON_from_amount (amount),
"instance", instance,
"justification", justification,
- "pickup_url", "https://example.com");
+ "pickup_url", pickup_url,
+ "next_url", next_url);
if (NULL == te_obj)
{
GNUNET_break (0);
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index 9bbcb00..769421b 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -3033,6 +3033,8 @@ interpreter_run (void *cls)
= TALER_MERCHANT_tip_authorize
(ctx,
MERCHANT_URL,
+ "http://merchant.com/pickup",
+ "http://merchant.com/continue",
&amount,
cmd->details.tip_authorize.instance,
cmd->details.tip_authorize.justification,
--
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: fix bug in testcase (and API) introduced when next_url and pickup_url were added to the spec,
gnunet <=