From 902cb22b5e6d0af4766f0a14045fb16dd979bf31 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Wed, 4 Nov 2015 21:11:56 +0100 Subject: adding wire_deadline to deposit arguments --- src/backend/taler-merchant-httpd_pay.c | 8 +++++++- src/frontend/pay.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/backend/taler-merchant-httpd_pay.c b/src/backend/taler-merchant-httpd_pay.c index a08dd5e2..6a9c4af2 100644 --- a/src/backend/taler-merchant-httpd_pay.c +++ b/src/backend/taler-merchant-httpd_pay.c @@ -158,6 +158,7 @@ MH_handler_pay (struct TMH_RequestHandler *rh, struct GNUNET_TIME_Absolute edate; struct GNUNET_TIME_Absolute timestamp; struct GNUNET_TIME_Absolute refund_deadline; + struct GNUNET_TIME_Absolute wire_deadline; struct TALER_MerchantPublicKeyP pubkey; struct TALER_CoinSpendPublicKeyP coin_pub; struct TALER_DenominationPublicKey denom_pub; @@ -171,6 +172,7 @@ MH_handler_pay (struct TMH_RequestHandler *rh, TMH_PARSE_member_amount ("max_fee", &max_fee), TMH_PARSE_member_time_abs ("timestamp", ×tamp), TMH_PARSE_member_time_abs ("refund_deadline", &refund_deadline), + TMH_PARSE_member_time_abs ("edate", &wire_deadline), TMH_PARSE_member_uint64 ("transaction_id", &transaction_id), TMH_PARSE_member_fixed ("H_contract", &h_contract), TMH_PARSE_MEMBER_END @@ -303,7 +305,7 @@ MH_handler_pay (struct TMH_RequestHandler *rh, /* a */ if (-1 == json_object_update (root, coin_aggregate)) - return TMH_RESPONSE_reply_internal_error (connection, "deposit permission not generated"); + return TMH_RESPONSE_reply_internal_error (connection, "deposit permission not generated for storing"); /* b */ char *deposit_permission_str = json_dumps (root, JSON_COMPACT); @@ -320,8 +322,12 @@ MH_handler_pay (struct TMH_RequestHandler *rh, return res; /* may return GNUNET_NO */ + printf ("about to spend money\n"); + return MHD_NO; + dh = TALER_MINT_deposit (mints[mint_index].conn, &amount, + wire_deadline, wire_details, &h_contract, &coin_pub, diff --git a/src/frontend/pay.php b/src/frontend/pay.php index a23b9481..33f3b712 100644 --- a/src/frontend/pay.php +++ b/src/frontend/pay.php @@ -58,7 +58,7 @@ $new_deposit_permission_edate = array_merge ($new_deposit_permission, $edate); if ($cli_debug && !$backend_test) { - /* NOTE the newline at the end of 'echo's argument */ + /* DO NOTE the newline at the end of 'echo's argument */ //echo json_encode ($new_deposit_permission_edate, JSON_PRETTY_PRINT) echo json_encode ($new_deposit_permission, JSON_PRETTY_PRINT) . "\n"; -- cgit v1.2.3