diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-10-30 15:36:37 +0100 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2015-10-30 15:36:37 +0100 |
commit | a4c5e087f714d0e2cafff3edd47887e4602470a8 (patch) | |
tree | 19811926081c6bfb887783d50a72edbb4a06d116 /src/backend/taler-mint-httpd_responses.c | |
parent | a5658415628c57d7405036059eb03a9112a03596 (diff) | |
download | merchant-a4c5e087f714d0e2cafff3edd47887e4602470a8.tar.gz merchant-a4c5e087f714d0e2cafff3edd47887e4602470a8.tar.bz2 merchant-a4c5e087f714d0e2cafff3edd47887e4602470a8.zip |
Adding initial behaviour to associate a deposit fee to a
coin. To be used when iterating over the array of coins
gotten within a payment, in order to check if the wallet is
below the max. limit allowed (by the merchant) for deposit fee.
Diffstat (limited to 'src/backend/taler-mint-httpd_responses.c')
-rw-r--r-- | src/backend/taler-mint-httpd_responses.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/backend/taler-mint-httpd_responses.c b/src/backend/taler-mint-httpd_responses.c index 70cf7e52..00a4d25f 100644 --- a/src/backend/taler-mint-httpd_responses.c +++ b/src/backend/taler-mint-httpd_responses.c @@ -186,4 +186,21 @@ TMH_RESPONSE_add_global_headers (struct MHD_Response *response) "close"); } +/** + * Send a response indicating an external error. + * + * @param connection the MHD connection to use + * @param hint hint about the error's nature + * @return a MHD result code + */ +int +TMH_RESPONSE_reply_external_error (struct MHD_Connection *connection, + const char *hint) +{ + return TMH_RESPONSE_reply_json_pack (connection, + MHD_HTTP_BAD_REQUEST, + "{s:s, s:s}", + "error", "client error", + "hint", hint); +} /* end of taler-mint-httpd_responses.c */ |