summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_private-post-transfers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-transfers.c')
-rw-r--r--src/backend/taler-merchant-httpd_private-post-transfers.c50
1 files changed, 37 insertions, 13 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-transfers.c b/src/backend/taler-merchant-httpd_private-post-transfers.c
index 29e59972..fd9752d8 100644
--- a/src/backend/taler-merchant-httpd_private-post-transfers.c
+++ b/src/backend/taler-merchant-httpd_private-post-transfers.c
@@ -265,7 +265,11 @@ transfer_cleanup (void *cls)
* @param amount_with_fee amount the exchange will transfer for this coin
* @param deposit_fee fee the exchange will charge for this coin
* @param refund_fee fee the exchange will charge for refunding this coin
- * @param exchange_proof proof from exchange that coin was accepted
+ * @param h_wire hash of merchant's wire details
+ * @param deposit_timestamp when did the exchange receive the deposit
+ * @param refund_deadline until when are refunds allowed
+ * @param exchange_sig signature by the exchange
+ * @param exchange_pub exchange signing key used for @a exchange_sig
*/
static void
check_transfer (void *cls,
@@ -278,8 +282,7 @@ check_transfer (void *cls,
struct GNUNET_TIME_Absolute deposit_timestamp,
struct GNUNET_TIME_Absolute refund_deadline,
const struct TALER_ExchangeSignatureP *exchange_sig,
- const struct TALER_ExchangePublicKeyP *exchange_pub);
-
+ const struct TALER_ExchangePublicKeyP *exchange_pub)
{
struct PostTransfersContext *ptc = cls;
const struct TALER_TrackTransferDetails *ttd = ptc->current_detail;
@@ -298,16 +301,37 @@ check_transfer (void *cls,
/* Build the `TrackTransferConflictDetails` */
ptc->response
= TALER_MHD_make_json_pack (
- "{s:I, s:s, s:o, s:I, s:o, s:s, s:o, s:o}",
- "code", (json_int_t) TALER_EC_POST_TRANSFERS_CONFLICTING_REPORTS,
- "hint", "disagreement about deposit valuation",
- "exchange_deposit_proof", exchange_proof,
- "conflict_offset", (json_int_t) ptc->current_offset,
- "coin_pub", GNUNET_JSON_from_data_auto (&ttd->coin_pub),
- "h_contract_terms", GNUNET_JSON_from_data_auto (
- &ttd->h_contract_terms),
- "amount_with_fee", TALER_JSON_from_amount (amount_with_fee),
- "deposit_fee", TALER_JSON_from_amount (deposit_fee));
+ "{s:I, s:s, s:s, s:o, s:o,"
+ " s:I, s:o, s:o, s:o, s:o,"
+ " s:o, s:o, s:o }",
+ "code",
+ (json_int_t) TALER_EC_POST_TRANSFERS_CONFLICTING_REPORTS,
+ "hint",
+ "disagreement about deposit valuation",
+ "exchange_url",
+ exchange_url,
+ "deposit_timestamp",
+ GNUNET_JSON_from_time_abs (deposit_timestamp),
+ "refund_deadline",
+ GNUNET_JSON_from_time_abs (refund_deadline),
+ /* first block of 5 */
+ "conflict_offset",
+ (json_int_t) ptc->current_offset,
+ "coin_pub",
+ GNUNET_JSON_from_data_auto (&ttd->coin_pub),
+ "h_wire",
+ GNUNET_JSON_from_data_auto (h_wire),
+ "exchange_sig",
+ GNUNET_JSON_from_data_auto (exchange_sig),
+ "exchange_pub",
+ GNUNET_JSON_from_data_auto (exchange_pub),
+ /* first block of 5 */
+ "h_contract_terms",
+ GNUNET_JSON_from_data_auto (&ttd->h_contract_terms),
+ "amount_with_fee",
+ TALER_JSON_from_amount (amount_with_fee),
+ "deposit_fee",
+ TALER_JSON_from_amount (deposit_fee));
return;
}
ptc->check_transfer_result = GNUNET_OK;