summaryrefslogtreecommitdiff
path: root/src/lib/merchant_api_tip_authorize.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-12-13 22:18:47 +0100
committerChristian Grothoff <christian@grothoff.org>2017-12-13 22:18:47 +0100
commit015dd3aebfdea6d090cc07bb3c7586aadff83465 (patch)
tree0ecf62480a628dc8cdc567fbce695f8294ecb28b /src/lib/merchant_api_tip_authorize.c
parent9d79c8c2c819a823ad7f75824c4fbd885543c48a (diff)
downloadmerchant-015dd3aebfdea6d090cc07bb3c7586aadff83465.tar.gz
merchant-015dd3aebfdea6d090cc07bb3c7586aadff83465.tar.bz2
merchant-015dd3aebfdea6d090cc07bb3c7586aadff83465.zip
fix bug in testcase (and API) introduced when next_url and pickup_url were added to the spec
Diffstat (limited to 'src/lib/merchant_api_tip_authorize.c')
-rw-r--r--src/lib/merchant_api_tip_authorize.c14
1 files changed, 10 insertions, 4 deletions
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);