diff options
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 3f3f5721..7dab61ed 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 */  | 
