summaryrefslogtreecommitdiff
path: root/src/lib/merchant_api_post_transfers.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-01 22:49:04 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-01 22:49:04 +0200
commit92b86cc5a7277de1a3b3ab55aaf37c83a649930e (patch)
treeeef73525a65c6fe6825559f050b8ea971ca8302a /src/lib/merchant_api_post_transfers.c
parent4e18bf19dfed52aa448a0b0d8547c0be182ba36a (diff)
downloadmerchant-92b86cc5a7277de1a3b3ab55aaf37c83a649930e.tar.gz
merchant-92b86cc5a7277de1a3b3ab55aaf37c83a649930e.tar.bz2
merchant-92b86cc5a7277de1a3b3ab55aaf37c83a649930e.zip
finish implementing #6935
Diffstat (limited to 'src/lib/merchant_api_post_transfers.c')
-rw-r--r--src/lib/merchant_api_post_transfers.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/lib/merchant_api_post_transfers.c b/src/lib/merchant_api_post_transfers.c
index 3e1a55d5..62984835 100644
--- a/src/lib/merchant_api_post_transfers.c
+++ b/src/lib/merchant_api_post_transfers.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014, 2015, 2016, 2020 Taler Systems SA
+ Copyright (C) 2014-2021 Taler Systems SA
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
@@ -104,9 +104,9 @@ handle_post_transfers_finished (void *cls,
json_t *deposit_sums;
struct GNUNET_JSON_Specification spec[] = {
TALER_JSON_spec_amount_any ("total",
- &total),
+ &total),
TALER_JSON_spec_amount_any ("wire_fee",
- &wire_fee),
+ &wire_fee),
TALER_JSON_spec_absolute_time ("execution_time",
&execution_time),
GNUNET_JSON_spec_json ("deposit_sums",
@@ -149,9 +149,9 @@ handle_post_transfers_finished (void *cls,
GNUNET_JSON_spec_string ("order_id",
&d->order_id),
TALER_JSON_spec_amount_any ("deposit_value",
- &d->deposit_value),
+ &d->deposit_value),
TALER_JSON_spec_amount_any ("deposit_fee",
- &d->deposit_fee),
+ &d->deposit_fee),
GNUNET_JSON_spec_end ()
};
@@ -300,12 +300,15 @@ TALER_MERCHANT_transfers_post (
GNUNET_free (pth);
return NULL;
}
- req = json_pack ("{s:o, s:o, s:s, s:s}",
- "credit_amount", TALER_JSON_from_amount (credit_amount),
- "wtid", GNUNET_JSON_from_data_auto (wtid),
- "payto_uri", payto_uri,
- "exchange_url", exchange_url);
- GNUNET_assert (NULL != req);
+ req = GNUNET_JSON_PACK (
+ TALER_JSON_pack_amount ("credit_amount",
+ credit_amount),
+ GNUNET_JSON_pack_data_auto ("wtid",
+ wtid),
+ GNUNET_JSON_pack_string ("payto_uri",
+ payto_uri),
+ GNUNET_JSON_pack_string ("exchange_url",
+ exchange_url));
eh = curl_easy_init ();
GNUNET_assert (NULL != eh);
if (GNUNET_OK != TALER_curl_easy_post (&pth->post_ctx,