diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-11-19 23:16:24 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-11-19 23:16:24 +0100 |
commit | 664100916192b1beb993addbfd33a1c8a8788c2c (patch) | |
tree | 4c4035524eae81170015ee30e2262744e5354f8d | |
parent | ba15286f27a34c69eb348ce3b8d9aa5764eb4905 (diff) | |
download | merchant-664100916192b1beb993addbfd33a1c8a8788c2c.tar.gz merchant-664100916192b1beb993addbfd33a1c8a8788c2c.tar.bz2 merchant-664100916192b1beb993addbfd33a1c8a8788c2c.zip |
Backend: fetching total amount from deposit permission
-rw-r--r-- | src/backend/taler-merchant-httpd_pay.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/taler-merchant-httpd_pay.c b/src/backend/taler-merchant-httpd_pay.c index 7b524b6a..1951d2d0 100644 --- a/src/backend/taler-merchant-httpd_pay.c +++ b/src/backend/taler-merchant-httpd_pay.c @@ -278,6 +278,7 @@ MH_handler_pay (struct TMH_RequestHandler *rh, struct TALER_Amount acc_fee; struct TALER_Amount coin_fee; struct TALER_Amount amount; + struct TALER_Amount percoin_amount; struct GNUNET_TIME_Absolute edate; struct GNUNET_TIME_Absolute timestamp; struct GNUNET_TIME_Absolute refund_deadline; @@ -293,6 +294,7 @@ MH_handler_pay (struct TMH_RequestHandler *rh, TMH_PARSE_member_array ("coins", &coins), TMH_PARSE_member_string ("mint", &chosen_mint), TMH_PARSE_member_amount ("max_fee", &max_fee), + TMH_PARSE_member_amount ("amount", &amount), TMH_PARSE_member_time_abs ("timestamp", ×tamp), TMH_PARSE_member_time_abs ("refund_deadline", &refund_deadline), TMH_PARSE_member_uint64 ("transaction_id", &transaction_id), @@ -301,7 +303,7 @@ MH_handler_pay (struct TMH_RequestHandler *rh, }; struct TMH_PARSE_FieldSpecification coin_aggregate_spec[] = { - TMH_PARSE_member_amount ("f", &amount), + TMH_PARSE_member_amount ("f", &percoin_amount), TMH_PARSE_member_fixed ("coin_pub", &coin_pub.eddsa_pub), TMH_PARSE_member_denomination_public_key ("denom_pub", &denom_pub), TMH_PARSE_member_denomination_signature ("ub_sig", &ub_sig), @@ -511,7 +513,7 @@ MH_handler_pay (struct TMH_RequestHandler *rh, percoin_dcc->pc = pc; dh = TALER_MINT_deposit (mints[mint_index].conn, - &amount, + &percoin_amount, edate, wire_details, &h_contract, |