commit 83bd17148ee72fd1110b192cbefee18b15a22f56
parent 0c481ef1b4c216ab6ba23a14c692cf384efb21dd
Author: Christian Grothoff <christian@grothoff.org>
Date: Tue, 9 Jun 2020 23:11:34 +0200
private-get-orders-ID now compiles -- but not more than that
Diffstat:
2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_get-orders-ID.c b/src/backend/taler-merchant-httpd_get-orders-ID.c
@@ -797,7 +797,7 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_FORBIDDEN,
- TALER_EC_GET_ORDERS_WRONG_CONTRACT,
+ TALER_EC_GET_ORDER_WRONG_CONTRACT,
"Contract hash does not match order");
}
}
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
@@ -566,7 +566,7 @@ deposit_cb (void *cls,
{
/* internal server error at exchange */
resume_pay_with_response (pc,
- MHD_HTTP_SERVICE_UNAVAILABLE,
+ MHD_HTTP_FAILED_DEPENDENCY,
TALER_MHD_make_json_pack (
"{s:s, s:I, s:I, s:I}",
"hint",
@@ -581,18 +581,19 @@ deposit_cb (void *cls,
else if (NULL == hr->reply)
{
/* We can't do anything meaningful here, the exchange did something wrong */
- resume_pay_with_response (pc,
- MHD_HTTP_FAILED_DEPENDENCY,
- TALER_MHD_make_json_pack (
- "{s:s, s:I, s:I, s:I}",
- "hint",
- "exchange failed, response body not even in JSON",
- "code",
- (json_int_t) TALER_EC_PAY_EXCHANGE_FAILED,
- "exchange_code",
- (json_int_t) hr->ec,
- "exchange_http_status",
- (json_int_t) hr->http_status));
+ resume_pay_with_response (
+ pc,
+ MHD_HTTP_FAILED_DEPENDENCY,
+ TALER_MHD_make_json_pack (
+ "{s:s, s:I, s:I, s:I}",
+ "hint",
+ "exchange failed, response body not even in JSON",
+ "code",
+ (json_int_t) TALER_EC_PAY_EXCHANGE_REPLY_MALFORMED,
+ "exchange_code",
+ (json_int_t) hr->ec,
+ "exchange_http_status",
+ (json_int_t) hr->http_status));
}
else
{
@@ -606,7 +607,7 @@ deposit_cb (void *cls,
"hint",
"exchange failed on deposit of a coin",
"code",
- (json_int_t) TALER_EC_PAY_EXCHANGE_FAILED,
+ (json_int_t) TALER_EC_PAY_INSUFFICIENT_FUNDS,
"exchange_code",
(json_int_t) hr->ec,
"exchange_http_status",