summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-06-09 23:11:34 +0200
committerChristian Grothoff <christian@grothoff.org>2020-06-09 23:11:34 +0200
commit83bd17148ee72fd1110b192cbefee18b15a22f56 (patch)
treed826e4f3e25082d57189bb0144bc23e5ccc4d01c /src/backend/taler-merchant-httpd_post-orders-ID-pay.c
parent0c481ef1b4c216ab6ba23a14c692cf384efb21dd (diff)
downloadmerchant-83bd17148ee72fd1110b192cbefee18b15a22f56.tar.gz
merchant-83bd17148ee72fd1110b192cbefee18b15a22f56.tar.bz2
merchant-83bd17148ee72fd1110b192cbefee18b15a22f56.zip
private-get-orders-ID now compiles -- but not more than that
Diffstat (limited to 'src/backend/taler-merchant-httpd_post-orders-ID-pay.c')
-rw-r--r--src/backend/taler-merchant-httpd_post-orders-ID-pay.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
index 6792a019..405a48e0 100644
--- 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",