merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 701840852505bebf4af0e0debe607fe41db62d29
parent 49ae1698ea841c5c5e817ccbb5bfdf7159c43294
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Wed, 19 Mar 2025 01:52:59 +0100

fix #9630

Diffstat:
Msrc/backend/taler-merchant-httpd_post-orders-ID-abort.c | 57+++++++++++++++++++++++++++++----------------------------
1 file changed, 29 insertions(+), 28 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-abort.c b/src/backend/taler-merchant-httpd_post-orders-ID-abort.c @@ -383,35 +383,36 @@ generate_success_response (struct AbortContext *ac) GNUNET_JSON_pack_string ("type", "undeposited")); } - else if (MHD_HTTP_OK != rdi->http_status) + else { - detail = GNUNET_JSON_PACK ( - GNUNET_JSON_pack_string ("type", - "failure"), - GNUNET_JSON_pack_uint64 ("exchange_status", - rdi->http_status), - GNUNET_JSON_pack_uint64 ("exchange_code", - (NULL != rdi->exchange_reply) - ? - TALER_JSON_get_error_code ( - rdi->exchange_reply) - : - TALER_EC_GENERIC_INVALID_RESPONSE), - GNUNET_JSON_pack_allow_null ( - GNUNET_JSON_pack_object_incref ("exchange_reply", - rdi->exchange_reply))); - } - else if (rdi->found_deposit) - { - detail = GNUNET_JSON_PACK ( - GNUNET_JSON_pack_string ("type", - "success"), - GNUNET_JSON_pack_uint64 ("exchange_status", - rdi->http_status), - GNUNET_JSON_pack_data_auto ("exchange_sig", - &rdi->exchange_sig), - GNUNET_JSON_pack_data_auto ("exchange_pub", - &rdi->exchange_pub)); + if (MHD_HTTP_OK != rdi->http_status) + { + detail = GNUNET_JSON_PACK ( + GNUNET_JSON_pack_string ("type", + "failure"), + GNUNET_JSON_pack_uint64 ("exchange_status", + rdi->http_status), + GNUNET_JSON_pack_uint64 ("exchange_code", + (NULL != rdi->exchange_reply) + ? TALER_JSON_get_error_code ( + rdi->exchange_reply) + : TALER_EC_GENERIC_INVALID_RESPONSE), + GNUNET_JSON_pack_allow_null ( + GNUNET_JSON_pack_object_incref ("exchange_reply", + rdi->exchange_reply))); + } + else + { + detail = GNUNET_JSON_PACK ( + GNUNET_JSON_pack_string ("type", + "success"), + GNUNET_JSON_pack_uint64 ("exchange_status", + rdi->http_status), + GNUNET_JSON_pack_data_auto ("exchange_sig", + &rdi->exchange_sig), + GNUNET_JSON_pack_data_auto ("exchange_pub", + &rdi->exchange_pub)); + } } GNUNET_assert (0 == json_array_append_new (refunds,