diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-03-28 17:21:51 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-03-28 17:21:51 +0100 |
commit | cf13997ffc638d8b99d23d22d84cc857cfe592cb (patch) | |
tree | 265d059b5df8f5226466140afab0ac7e0793c848 /src/mint/taler-mint-httpd_responses.c | |
parent | 3c87b1a0b38449e403e8bb2a0ded627e789b6fe4 (diff) |
fix use of struct TALER_DepositConfirmationPS
Diffstat (limited to 'src/mint/taler-mint-httpd_responses.c')
-rw-r--r-- | src/mint/taler-mint-httpd_responses.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/mint/taler-mint-httpd_responses.c b/src/mint/taler-mint-httpd_responses.c index e8f657d25..0fe3f4700 100644 --- a/src/mint/taler-mint-httpd_responses.c +++ b/src/mint/taler-mint-httpd_responses.c @@ -276,18 +276,20 @@ TMH_RESPONSE_reply_invalid_json (struct MHD_Connection *connection) * @param h_wire hash of wire details * @param h_contract hash of contract details * @param transaction_id transaction ID + * @param refund_deadline until when this deposit be refunded * @param merchant merchant public key * @param amount_without_fee fraction of coin value to deposit, without the fee * @return MHD result code */ int TMH_RESPONSE_reply_deposit_success (struct MHD_Connection *connection, - const union TALER_CoinSpendPublicKeyP *coin_pub, - const struct GNUNET_HashCode *h_wire, - const struct GNUNET_HashCode *h_contract, - uint64_t transaction_id, - const struct TALER_MerchantPublicKeyP *merchant, - const struct TALER_Amount *amount_without_fee) + const union TALER_CoinSpendPublicKeyP *coin_pub, + const struct GNUNET_HashCode *h_wire, + const struct GNUNET_HashCode *h_contract, + uint64_t transaction_id, + struct GNUNET_TIME_Absolute refund_deadline, + const struct TALER_MerchantPublicKeyP *merchant, + const struct TALER_Amount *amount_without_fee) { struct TALER_DepositConfirmationPS dc; struct TALER_MintSignatureP sig; @@ -299,12 +301,14 @@ TMH_RESPONSE_reply_deposit_success (struct MHD_Connection *connection, dc.h_contract = *h_contract; dc.h_wire = *h_wire; dc.transaction_id = GNUNET_htonll (transaction_id); + dc.timestamp = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); + dc.refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline); TALER_amount_hton (&dc.amount_without_fee, amount_without_fee); dc.coin_pub = *coin_pub; dc.merchant = *merchant; TMH_KS_sign (&dc.purpose, - &sig); + &sig); sig_json = TALER_json_from_eddsa_sig (&dc.purpose, &sig.eddsa_signature); ret = TMH_RESPONSE_reply_json_pack (connection, |