diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-01-09 12:18:46 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-01-09 12:18:46 +0100 |
commit | adfd806648d1a58e7ab67f7988f6a4e98500a8a3 (patch) | |
tree | e13af64d5a82a3b12e4ba116f32a5d53c3a39cc0 | |
parent | 7202823d81e868d411b733fcce61906ba268f932 (diff) | |
download | merchant-adfd806648d1a58e7ab67f7988f6a4e98500a8a3.tar.gz merchant-adfd806648d1a58e7ab67f7988f6a4e98500a8a3.tar.bz2 merchant-adfd806648d1a58e7ab67f7988f6a4e98500a8a3.zip |
fix #6015
-rw-r--r-- | src/backend/taler-merchant-httpd_order.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/backend/taler-merchant-httpd_order.c b/src/backend/taler-merchant-httpd_order.c index a35b2cef..892dfce7 100644 --- a/src/backend/taler-merchant-httpd_order.c +++ b/src/backend/taler-merchant-httpd_order.c @@ -463,7 +463,6 @@ proposal_put (struct MHD_Connection *connection, { return MHD_YES; } - /* other internal errors might have occurred */ if (GNUNET_SYSERR == res) { @@ -473,6 +472,17 @@ proposal_put (struct MHD_Connection *connection, TALER_EC_PROPOSAL_ORDER_PARSE_ERROR, "Impossible to parse the order"); } + if (0 != + strcasecmp (total.currency, + TMH_currency)) + { + GNUNET_break_op (0); + return TALER_MHD_reply_with_error + (connection, + MHD_HTTP_BAD_REQUEST, + TALER_EC_PROPOSAL_ORDER_BAD_CURRENCY, + "Total amount must be in currency supported by backend"); + } if (wire_transfer_deadline.abs_value_us < refund_deadline.abs_value_us) |