diff options
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-orders.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-orders.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c index 06fd562b..5ccad64d 100644 --- a/src/backend/taler-merchant-httpd_private-post-orders.c +++ b/src/backend/taler-merchant-httpd_private-post-orders.c @@ -673,9 +673,18 @@ patch_order (struct MHD_Connection *connection, /* Fill in merchant information if necessary */ - if (NULL == json_object_get (order, + if (NULL != json_object_get (order, "merchant")) { + GNUNET_break_op (0); + return TALER_MHD_reply_with_error ( + connection, + MHD_HTTP_BAD_REQUEST, + TALER_EC_PROPOSAL_ORDER_PARSE_ERROR, + "'merchant' field already set, but must be provided by backend"); + } + else + { const char *mj = NULL; const char *ma = NULL; json_t *locations; |