From cd83daaeae915e0c1b6170cb11f40aa1cfbfece4 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 16 Mar 2020 20:22:30 +0100 Subject: simplify refund processing, add additional checks for matching currency --- src/include/taler_error_codes.h | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'src/include') diff --git a/src/include/taler_error_codes.h b/src/include/taler_error_codes.h index e6bd73647..9a7c544b9 100644 --- a/src/include/taler_error_codes.h +++ b/src/include/taler_error_codes.h @@ -382,11 +382,11 @@ enum TALER_ErrorCode TALER_EC_DENOMINATION_KEY_LOST = 1116, /** - * The exchange's database entry with the reserve balance summary - * is inconsistent with its own history of the reserve. - * Returned with an HTTP status of #MHD_HTTP_INTERNAL_SERVER_ERROR. + * The exchange's database entry with the reserve balance summary is + * inconsistent with its own history of the reserve. Returned with an + * HTTP status of #MHD_HTTP_INTERNAL_SERVER_ERROR. */ - TALER_EC_WITHDRAW_HISTORY_RESERVE_BALANCE_CORRUPT = 1117, + TALER_EC_WITHDRAW_RESERVE_BALANCE_CORRUPT = 1117, /** * The exchange failed to obtain the transaction history of the given @@ -528,6 +528,13 @@ enum TALER_ErrorCode */ TALER_EC_DEPOSIT_INVALID_SIGNATURE_BY_EXCHANGE = 1221, + /** + * The currency specified for the deposit is different from the + * currency of the coin. This response is provided with HTTP status + * code MHD_HTTP_PRECONDITION_FAILED. + */ + TALER_EC_DEPOSIT_CURRENCY_MISSMATCH = 1222, + /** * The respective coin did not have sufficient residual value for the * /refresh/melt operation. The "history" in this response provdes @@ -544,7 +551,7 @@ enum TALER_ErrorCode * "original_value". This response is provided with HTTP status code * MHD_HTTP_CONFLICT. */ - TALER_EC_TALER_EC_REFRESH_MELT_DENOMINATION_KEY_NOT_FOUND = 1301, + TALER_EC_REFRESH_MELT_DENOMINATION_KEY_NOT_FOUND = 1301, /** * The exchange had an internal error reconstructing the transaction @@ -607,6 +614,13 @@ enum TALER_ErrorCode */ TALER_EC_MELT_INVALID_SIGNATURE_BY_EXCHANGE = 1310, + /** + * The currency specified for the melt amount is different from the + * currency of the coin. This response is provided with HTTP status + * code MHD_HTTP_PRECONDITION_FAILED. + */ + TALER_EC_MELT_CURRENCY_MISSMATCH = 1311, + /** * The exchange is unaware of the denomination key that was used to * sign the melted zombie coin. This response is provided with HTTP -- cgit v1.2.3