aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-06-09 21:40:12 +0200
committerChristian Grothoff <christian@grothoff.org>2016-06-09 21:40:12 +0200
commitdd7026e6f0c67ca9ecd49d5755faf9f176ae3f59 (patch)
treebbefda9c94a2cb8a2f4a3981ffb31cf912ca3cc1
parent7046337c78d9bcebe3c0c8a9ce7e7131df707962 (diff)
exchange URI should not need to be passed when tracking transaction
-rw-r--r--src/include/taler_merchant_service.h4
-rw-r--r--src/lib/merchant_api_track_transaction.c16
-rw-r--r--src/lib/test_merchant_api.c1
3 files changed, 10 insertions, 11 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index 7aa91125..51293744 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -393,8 +393,7 @@ typedef void
*
* @param ctx execution context
* @param backend_uri base URI of the backend
- * @param wtid base32 string indicating a wtid
- * @param exchange base URL of the exchange in charge of returning the wanted information
+ * @param transaction_id which transaction should we trace
* @param track_transaction_cb the callback to call when a reply for this request is available
* @param track_transaction_cb_cls closure for @a track_transaction_cb
* @return a handle for this request
@@ -403,7 +402,6 @@ struct TALER_MERCHANT_TrackTransactionHandle *
TALER_MERCHANT_track_transaction (struct GNUNET_CURL_Context *ctx,
const char *backend_uri,
uint64_t transaction_id,
- const char *exchange_uri,
TALER_MERCHANT_TrackTransactionCallback track_transaction_cb,
void *track_transaction_cb_cls);
diff --git a/src/lib/merchant_api_track_transaction.c b/src/lib/merchant_api_track_transaction.c
index 84f6f32e..b494b993 100644
--- a/src/lib/merchant_api_track_transaction.c
+++ b/src/lib/merchant_api_track_transaction.c
@@ -99,6 +99,11 @@ handle_tracktransaction_finished (void *cls,
/* FIXME: actually verify signature */
}
break;
+ case MHD_HTTP_ACCEPTED:
+ {
+ /* Expect time stamp of when the transfer is supposed to happen */
+ }
+ break;
case MHD_HTTP_NOT_FOUND:
/* Nothing really to verify, this should never
happen, we should pass the JSON reply to the application */
@@ -134,17 +139,15 @@ handle_tracktransaction_finished (void *cls,
*
* @param ctx execution context
* @param backend_uri base URI of the backend
- * @param wtid base32 string indicating a wtid
- * @param exchange base URL of the exchange in charge of returning the wanted information
+ * @param transaction_id which transaction should we trace
* @param track_transaction_cb the callback to call when a reply for this request is available
- * @param track_transaction_cb_cls closure for @a contract_cb
+ * @param track_transaction_cb_cls closure for @a track_transaction_cb
* @return a handle for this request
*/
struct TALER_MERCHANT_TrackTransactionHandle *
TALER_MERCHANT_track_transaction (struct GNUNET_CURL_Context *ctx,
const char *backend_uri,
uint64_t transaction_id,
- const char *exchange_uri,
TALER_MERCHANT_TrackTransactionCallback track_transaction_cb,
void *track_transaction_cb_cls)
{
@@ -156,10 +159,9 @@ TALER_MERCHANT_track_transaction (struct GNUNET_CURL_Context *ctx,
tdo->cb = track_transaction_cb;
tdo->cb_cls = track_transaction_cb_cls;
GNUNET_asprintf (&tdo->url,
- "%s/track/transaction?transaction=%llu&exchange=%s",
+ "%s/track/transaction?transaction=%llu",
backend_uri,
- (unsigned long long) transaction_id,
- exchange_uri);
+ (unsigned long long) transaction_id);
eh = curl_easy_init ();
GNUNET_assert (CURLE_OK ==
curl_easy_setopt (eh,
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index 21c839ab..3732649c 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -1544,7 +1544,6 @@ interpreter_run (void *cls)
TALER_MERCHANT_track_transaction (ctx,
MERCHANT_URI,
ref->details.pay.transaction_id,
- EXCHANGE_URI,
&track_transaction_cb,
is);
return;