exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 6702d0eff1089378122e6cf8143aeac3d5b6e727
parent 5c8bfde50202c1d0bd619b23b4c51599702a6075
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 19 Apr 2026 23:10:07 +0200

update gana

Diffstat:
Msrc/include/taler/taler_error_codes.h | 48++++++++++++++++++++++++++++++++++++++++++++++++
Msrc/util/taler_error_codes.c | 50+++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 97 insertions(+), 1 deletion(-)

diff --git a/src/include/taler/taler_error_codes.h b/src/include/taler/taler_error_codes.h @@ -5841,6 +5841,54 @@ enum TALER_ErrorCode /** + * The request is invalid as the specified order is unpaid. The client should only call this endpoint after paying the order. + * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400). + * (A value of 0 indicates that the error is generated client-side). + */ + TALER_EC_PAIVANA_PAYMENT_MISSING = 9800, + + + /** + * The merchant backend refused our request to check the payment status. The backend is either down or Paivana is configured badly. The system administrator should check the logs. + * Returned with an HTTP status code of #MHD_HTTP_BAD_GATEWAY (502). + * (A value of 0 indicates that the error is generated client-side). + */ + TALER_EC_PAIVANA_BACKEND_REFUSED = 9801, + + + /** + * The order specified in the request is unknown to the backend. The client must instantiate the Paivana template first and pay the order before calling this endpoint. + * Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404). + * (A value of 0 indicates that the error is generated client-side). + */ + TALER_EC_PAIVANA_ORDER_UNKNOWN = 9802, + + + /** + * The merchant backend returned an unexpected status code. This is probably a protocol incompatibility that should be reported to the developers. + * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). + * (A value of 0 indicates that the error is generated client-side). + */ + TALER_EC_PAIVANA_BACKEND_ERROR = 9803, + + + /** + * Paivana failed to initialize the request to check the payment status. This should never happen. The system administrator should consult the logs. + * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). + * (A value of 0 indicates that the error is generated client-side). + */ + TALER_EC_PAIVANA_GET_ORDER_FAILED = 9804, + + + /** + * The specified order does not match the specified Website or nonce and thus the order is invalid for the given request. Clients should pay for the correct order for access to the resource. + * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409). + * (A value of 0 indicates that the error is generated client-side). + */ + TALER_EC_PAIVANA_WRONG_ORDER = 9805, + + + /** * End of error code range. * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0). * (A value of 0 indicates that the error is generated client-side). diff --git a/src/util/taler_error_codes.c b/src/util/taler_error_codes.c @@ -5589,6 +5589,54 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = { }, { + /* 9800 */ + .ec = TALER_EC_PAIVANA_PAYMENT_MISSING, + .hint = + "The request is invalid as the specified order is unpaid. The client should only call this endpoint after paying the order.", + .http_code = MHD_HTTP_BAD_REQUEST + }, + + { + /* 9801 */ + .ec = TALER_EC_PAIVANA_BACKEND_REFUSED, + .hint = + "The merchant backend refused our request to check the payment status. The backend is either down or Paivana is configured badly. The system administrator should check the logs.", + .http_code = MHD_HTTP_BAD_GATEWAY + }, + + { + /* 9802 */ + .ec = TALER_EC_PAIVANA_ORDER_UNKNOWN, + .hint = + "The order specified in the request is unknown to the backend. The client must instantiate the Paivana template first and pay the order before calling this endpoint.", + .http_code = MHD_HTTP_NOT_FOUND + }, + + { + /* 9803 */ + .ec = TALER_EC_PAIVANA_BACKEND_ERROR, + .hint = + "The merchant backend returned an unexpected status code. This is probably a protocol incompatibility that should be reported to the developers.", + .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR + }, + + { + /* 9804 */ + .ec = TALER_EC_PAIVANA_GET_ORDER_FAILED, + .hint = + "Paivana failed to initialize the request to check the payment status. This should never happen. The system administrator should consult the logs.", + .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR + }, + + { + /* 9805 */ + .ec = TALER_EC_PAIVANA_WRONG_ORDER, + .hint = + "The specified order does not match the specified Website or nonce and thus the order is invalid for the given request. Clients should pay for the correct order for access to the resource.", + .http_code = MHD_HTTP_CONFLICT + }, + + { /* 9999 */ .ec = TALER_EC_END, .hint = "End of error code range.", @@ -5602,7 +5650,7 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = { /** * The length of @e code_hint_pairs. */ -static const unsigned int code_hint_pairs_length = 724; +static const unsigned int code_hint_pairs_length = 730; const char *