summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <marcello.stanisci@inria.fr>2015-11-04 21:11:56 +0100
committerMarcello Stanisci <marcello.stanisci@inria.fr>2015-11-04 21:11:56 +0100
commit902cb22b5e6d0af4766f0a14045fb16dd979bf31 (patch)
tree105d6f43bab9b79bb01d6b2adebde507266ef586
parent79abf2bff00101af5a14f18bcb8877873df8b973 (diff)
downloadmerchant-902cb22b5e6d0af4766f0a14045fb16dd979bf31.tar.gz
merchant-902cb22b5e6d0af4766f0a14045fb16dd979bf31.tar.bz2
merchant-902cb22b5e6d0af4766f0a14045fb16dd979bf31.zip
adding wire_deadline to deposit arguments
-rw-r--r--src/backend/taler-merchant-httpd_pay.c8
-rw-r--r--src/frontend/pay.php2
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", &timestamp),
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";