diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-29 16:42:38 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-29 16:42:38 +0200 |
commit | 21d26132877990d7beac118b33e336aaed395234 (patch) | |
tree | d970f8115b00b5125ffc4aef89c0a2dd721c0ee8 /src/exchange/taler-exchange-httpd_responses.h | |
parent | 5aebc70da6524d3b27ad4f93a66ba70dbe64fab1 (diff) | |
download | exchange-21d26132877990d7beac118b33e336aaed395234.tar.gz exchange-21d26132877990d7beac118b33e336aaed395234.tar.bz2 exchange-21d26132877990d7beac118b33e336aaed395234.zip |
first sketch at db module implementation for #3887
Diffstat (limited to 'src/exchange/taler-exchange-httpd_responses.h')
-rw-r--r-- | src/exchange/taler-exchange-httpd_responses.h | 43 |
1 files changed, 38 insertions, 5 deletions
diff --git a/src/exchange/taler-exchange-httpd_responses.h b/src/exchange/taler-exchange-httpd_responses.h index 179ae0066..27b20d353 100644 --- a/src/exchange/taler-exchange-httpd_responses.h +++ b/src/exchange/taler-exchange-httpd_responses.h @@ -250,17 +250,20 @@ TEH_RESPONSE_reply_deposit_success (struct MHD_Connection *connection, /** - * Send proof that a /deposit request is invalid to client. This - * function will create a message with all of the operations affecting - * the coin that demonstrate that the coin has insufficient value. + * Send proof that a request is invalid to client because of + * insufficient funds. This function will create a message with all + * of the operations affecting the coin that demonstrate that the coin + * has insufficient value. * * @param connection connection to the client + * @param ec error code to return * @param tl transaction list to use to build reply * @return MHD result code */ int -TEH_RESPONSE_reply_deposit_insufficient_funds (struct MHD_Connection *connection, - const struct TALER_EXCHANGEDB_TransactionList *tl); +TEH_RESPONSE_reply_coin_insufficient_funds (struct MHD_Connection *connection, + enum TALER_ErrorCode ec, + const struct TALER_EXCHANGEDB_TransactionList *tl); /** @@ -556,4 +559,34 @@ TEH_RESPONSE_reply_refresh_link_success (struct MHD_Connection *connection, const struct TEH_RESPONSE_LinkSessionInfo *sessions); +/** + * A wallet asked for /payback, but we do not know anything + * about the original withdraw operation given. 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); + + +/** + * A wallet asked for /payback, return the successful response. + * + * @param connection connection to the client + * @param wire_subject the wire subject we will use for the pay back operation + * @param amount the amount we will wire back + * @param payback_deadline deadline by which the exchange promises to pay + * @return MHD result code + */ +int +TEH_RESPONSE_reply_payback_success (struct MHD_Connection *connection, + const char *wire_subject, + const struct TALER_Amount *amount, + struct GNUNET_TIME_Absolute payback_deadline); + + #endif |