diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-06-19 17:53:42 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-06-19 17:53:42 +0200 |
commit | 51ee20102fa3818e9e4a4113a59ad700cb7eea42 (patch) | |
tree | 1a357666eb4811fbacc3fd72e5dc94a7556f9196 /src/exchange/taler-exchange-httpd_responses.c | |
parent | 92e6744ac032a3c4c4118ac6b251f769c5478aa6 (diff) | |
download | exchange-51ee20102fa3818e9e4a4113a59ad700cb7eea42.tar.gz exchange-51ee20102fa3818e9e4a4113a59ad700cb7eea42.tar.bz2 exchange-51ee20102fa3818e9e4a4113a59ad700cb7eea42.zip |
address #5010 for /payback
Diffstat (limited to 'src/exchange/taler-exchange-httpd_responses.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_responses.c | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c index 3f3f57215..7dab61ed6 100644 --- a/src/exchange/taler-exchange-httpd_responses.c +++ b/src/exchange/taler-exchange-httpd_responses.c @@ -1294,67 +1294,4 @@ TEH_RESPONSE_reply_track_transfer_details (struct MHD_Connection *connection, -/** - * A wallet asked for /payback, but we do not know anything about the - * original withdraw operation specified. Generates a 404 reply. - * - * @param connection connection to the client - * @param ec Taler error code - * @return MHD result code - */ -int -TEH_RESPONSE_reply_payback_unknown (struct MHD_Connection *connection, - enum TALER_ErrorCode ec) -{ - return TEH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_NOT_FOUND, - "{s:s, s:I}", - "error", "blinded coin unknown", - "code", (json_int_t) ec); -} - - -/** - * A wallet asked for /payback, return the successful response. - * - * @param connection connection to the client - * @param coin_pub coin for which we are processing the payback request - * @param reserve_pub public key of the reserve that will receive the payback - * @param amount the amount we will wire back - * @param timestamp when did the exchange receive the /payback request - * @return MHD result code - */ -int -TEH_RESPONSE_reply_payback_success (struct MHD_Connection *connection, - const struct TALER_CoinSpendPublicKeyP *coin_pub, - const struct TALER_ReservePublicKeyP *reserve_pub, - const struct TALER_Amount *amount, - struct GNUNET_TIME_Absolute timestamp) -{ - struct TALER_PaybackConfirmationPS pc; - struct TALER_ExchangePublicKeyP pub; - struct TALER_ExchangeSignatureP sig; - - pc.purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_PAYBACK); - pc.purpose.size = htonl (sizeof (struct TALER_PaybackConfirmationPS)); - pc.timestamp = GNUNET_TIME_absolute_hton (timestamp); - TALER_amount_hton (&pc.payback_amount, - amount); - pc.coin_pub = *coin_pub; - pc.reserve_pub = *reserve_pub; - TEH_KS_sign (&pc.purpose, - &pub, - &sig); - return TEH_RESPONSE_reply_json_pack (connection, - MHD_HTTP_OK, - "{s:o, s:o, s:o, s:o, s:o}", - "reserve_pub", GNUNET_JSON_from_data_auto (reserve_pub), - "timestamp", GNUNET_JSON_from_time_abs (timestamp), - "amount", TALER_JSON_from_amount (amount), - "exchange_sig", GNUNET_JSON_from_data_auto (&sig), - "exchange_pub", GNUNET_JSON_from_data_auto (&pub)); -} - - - /* end of taler-exchange-httpd_responses.c */ |