diff options
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-orders.c | 8 | ||||
-rw-r--r-- | src/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 index 5a10e449..20a50d23 100644 --- 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 index ae804ddf..b7e406f4 100644 --- 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 |