merchant

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

commit c2f92c42c65346bde0bd5af01fbad51b2600a496
parent 99eb36e490f5f0ca16cb451941ca873b03016b27
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed,  4 Aug 2021 18:27:03 +0200

finish fix for #6953

Diffstat:
Msrc/backend/taler-merchant-httpd_private-post-orders.c | 8+++++---
Msrc/lib/merchant_api_post_orders.c | 3+++
2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c @@ -400,15 +400,17 @@ execute_order (struct MHD_Connection *connection, "order:products"); } - if (! TALER_JSON_check_i18n (fulfillment_i18n)) + if ( (NULL != fulfillment_i18n) && + (! TALER_JSON_check_i18n (fulfillment_i18n)) ) { GNUNET_JSON_parse_free (spec); return TALER_MHD_reply_with_error (connection, MHD_HTTP_BAD_REQUEST, TALER_EC_GENERIC_PARAMETER_MALFORMED, - "order:fulfillment_i18n"); + "order:fulfillment_message_i18n"); } - if (! TALER_JSON_check_i18n (summary_i18n)) + if ( (NULL != summary_i18n) && + (! TALER_JSON_check_i18n (summary_i18n)) ) { GNUNET_JSON_parse_free (spec); return TALER_MHD_reply_with_error (connection, diff --git a/src/lib/merchant_api_post_orders.c b/src/lib/merchant_api_post_orders.c @@ -127,6 +127,9 @@ handle_post_order_finished (void *cls, } break; case MHD_HTTP_BAD_REQUEST: + json_dumpf (json, + stderr, + JSON_INDENT (2)); por.hr.ec = TALER_JSON_get_error_code (json); por.hr.hint = TALER_JSON_get_error_hint (json); /* This should never happen, either us or