diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-08-25 20:32:36 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-08-25 20:32:36 +0200 |
commit | d354d119db7ca0195cb93140bf3160b11449fa92 (patch) | |
tree | ae96671396a0073d4416cb59d57a7a54f87bd20b /src/backend/taler-merchant-httpd_post-orders-ID-refund.c | |
parent | 0acefc910ff1b86aa04300310d63e3ea88d509de (diff) | |
download | merchant-d354d119db7ca0195cb93140bf3160b11449fa92.tar.gz merchant-d354d119db7ca0195cb93140bf3160b11449fa92.tar.bz2 merchant-d354d119db7ca0195cb93140bf3160b11449fa92.zip |
fix #6432
Diffstat (limited to 'src/backend/taler-merchant-httpd_post-orders-ID-refund.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_post-orders-ID-refund.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-refund.c b/src/backend/taler-merchant-httpd_post-orders-ID-refund.c index 7fafdd5e..18fca9ac 100644 --- a/src/backend/taler-merchant-httpd_post-orders-ID-refund.c +++ b/src/backend/taler-merchant-httpd_post-orders-ID-refund.c @@ -508,6 +508,7 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler *rh, { json_t *contract_terms; uint64_t order_serial; + qs = TMH_db->lookup_contract_terms (TMH_db->cls, hc->instance->settings.id, hc->infix, @@ -523,7 +524,7 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler *rh, return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, TALER_EC_GET_ORDERS_DB_FETCH_CONTRACT_TERMS_ERROR, - "db error fetching contract terms"); + NULL); } if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) { @@ -531,7 +532,7 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler *rh, return TALER_MHD_reply_with_error (connection, MHD_HTTP_NOT_FOUND, TALER_EC_GET_ORDERS_ORDER_NOT_FOUND, - "Did not find contract terms for order in DB"); + NULL); } { struct GNUNET_HashCode h_contract_terms; @@ -544,7 +545,7 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler *rh, return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, TALER_EC_GET_ORDERS_FAILED_COMPUTE_PROPOSAL_HASH, - "Failed to hash contract terms"); + NULL); } json_decref (contract_terms); if (0 != GNUNET_memcmp (&h_contract_terms, @@ -552,8 +553,8 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler *rh, { return TALER_MHD_reply_with_error (connection, MHD_HTTP_FORBIDDEN, - TALER_EC_GET_ORDERS_FAILED_COMPUTE_PROPOSAL_HASH, - ""); + TALER_EC_GET_ORDER_WRONG_CONTRACT, + NULL); } } } @@ -572,7 +573,7 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler *rh, return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, TALER_EC_GET_ORDERS_DB_LOOKUP_ERROR, - "Failed to lookup refunds for contract"); + NULL); } } @@ -595,7 +596,7 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler *rh, return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, TALER_EC_GET_ORDERS_DB_LOOKUP_ERROR, - "Merchant database error"); + NULL); case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS: /* We need to talk to the exchange */ /* Notify clients waiting for the refund to be obtained. */ |