summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-07-21 15:54:57 +0200
committerChristian Grothoff <christian@grothoff.org>2017-07-21 23:19:47 +0200
commita7552719e982e1f1380f7478fc539d002336371e (patch)
tree1b5d6b06c37a2b529d589313ef34c883d83bb7c4 /src/lib
parentf3918c1df5a39ebd1a4455edd36ca4ccc35d0cbb (diff)
downloadmerchant-a7552719e982e1f1380f7478fc539d002336371e.tar.gz
merchant-a7552719e982e1f1380f7478fc539d002336371e.tar.bz2
merchant-a7552719e982e1f1380f7478fc539d002336371e.zip
work for #4943 (incomplete)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/merchant_api_track_transfer.c12
-rw-r--r--src/lib/test_merchant_api.c3
2 files changed, 9 insertions, 6 deletions
diff --git a/src/lib/merchant_api_track_transfer.c b/src/lib/merchant_api_track_transfer.c
index f0b65903..f3a35b5d 100644
--- a/src/lib/merchant_api_track_transfer.c
+++ b/src/lib/merchant_api_track_transfer.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014, 2015, 2016 GNUnet e.V. and INRIA
+ Copyright (C) 2014-2017 GNUnet e.V. and INRIA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU Lesser General Public License as published by the Free Software
@@ -112,9 +112,8 @@ check_track_transfer_response_ok (struct TALER_MERCHANT_TrackTransferHandle *wdh
num_details = json_array_size (deposits);
{
struct TALER_MERCHANT_TrackTransferDetails details[num_details];
- unsigned int i;
- for (i=0;i<num_details;i++)
+ for (unsigned int i=0;i<num_details;i++)
{
struct TALER_MERCHANT_TrackTransferDetails *detail = &details[i];
json_t *deposit = json_array_get (deposits, i);
@@ -217,6 +216,7 @@ handle_track_transfer_finished (void *cls,
* @param ctx execution context
* @param backend_uri base URI of the backend
* @param instance which merchant instance is going to be tracked
+ * @param wire_method wire method used for the wire transfer
* @param wtid base32 string indicating a wtid
* @param exchange_uri base URL of the exchange in charge of returning the wanted information
* @param track_transfer_cb the callback to call when a reply for this request is available
@@ -227,6 +227,7 @@ struct TALER_MERCHANT_TrackTransferHandle *
TALER_MERCHANT_track_transfer (struct GNUNET_CURL_Context *ctx,
const char *backend_uri,
const char *instance,
+ const char *wire_method,
const struct TALER_WireTransferIdentifierRawP *wtid,
const char *exchange_uri,
TALER_MERCHANT_TrackTransferCallback track_transfer_cb,
@@ -247,11 +248,12 @@ TALER_MERCHANT_track_transfer (struct GNUNET_CURL_Context *ctx,
base = MAH_path_to_url_ (backend_uri,
"/track/transfer");
GNUNET_asprintf (&tdo->url,
- "%s?wtid=%s&exchange=%s&instance=%s",
+ "%s?wtid=%s&exchange=%s&instance=%s&wire_method",
base,
wtid_str,
exchange_uri,
- instance);
+ instance,
+ wire_method);
GNUNET_free (base);
GNUNET_free (wtid_str);
eh = curl_easy_init ();
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index 69bc4c36..7ee108c2 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -2041,7 +2041,7 @@ interpreter_run (void *cls)
merchant_sig = ref->details.proposal.merchant_sig;
GNUNET_assert (NULL != ref->details.proposal.contract_terms);
{
- /* Get information that need to be replied in the deposit permission */
+ /* Get information that needs to be replied in the deposit permission */
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_string ("order_id", &order_id),
GNUNET_JSON_spec_absolute_time ("refund_deadline", &refund_deadline),
@@ -2207,6 +2207,7 @@ interpreter_run (void *cls)
= TALER_MERCHANT_track_transfer (ctx,
MERCHANT_URI,
instance,
+ "test",
&wtid,
EXCHANGE_URI,
&track_transfer_cb,