From 015dd3aebfdea6d090cc07bb3c7586aadff83465 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 13 Dec 2017 22:18:47 +0100 Subject: fix bug in testcase (and API) introduced when next_url and pickup_url were added to the spec --- src/lib/merchant_api_tip_authorize.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/lib/merchant_api_tip_authorize.c') diff --git a/src/lib/merchant_api_tip_authorize.c b/src/lib/merchant_api_tip_authorize.c index 3c7899df..a7aa4f5a 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); -- cgit v1.2.3