diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2023-10-07 20:19:36 +0200 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2023-10-13 21:16:49 +0200 |
commit | 98e316c848c6ba7dc86c56c9c4c4557925c43d6d (patch) | |
tree | 9fd3ea58c50c06abcf09c5f796618c7c664f1209 /src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c | |
parent | 829354b0c2c0951ba993c9e45e5c03d4e8fb5157 (diff) | |
download | merchant-98e316c848c6ba7dc86c56c9c4c4557925c43d6d.tar.gz merchant-98e316c848c6ba7dc86c56c9c4c4557925c43d6d.tar.bz2 merchant-98e316c848c6ba7dc86c56c9c4c4557925c43d6d.zip |
-first hack at multicurrency support in merchant
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c b/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c index fa98fc1a..1b2aa460 100644 --- a/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c +++ b/src/backend/taler-merchant-httpd_private-post-orders-ID-refund.c @@ -121,9 +121,8 @@ TMH_private_post_orders_ID_refund (const struct TMH_RequestHandler *rh, struct TALER_Amount refund; const char *reason; struct GNUNET_JSON_Specification spec[] = { - TALER_JSON_spec_amount ("refund", - TMH_currency, - &refund), + TALER_JSON_spec_amount_any ("refund", + &refund), GNUNET_JSON_spec_string ("reason", &reason), GNUNET_JSON_spec_end () @@ -309,17 +308,15 @@ TMH_private_post_orders_ID_refund (const struct TMH_RequestHandler *rh, TALER_EC_GENERIC_DB_COMMIT_FAILED, NULL); case TALER_MERCHANTDB_RS_NO_SUCH_ORDER: - { - /* We know the order exists from the - "lookup_contract_terms" at the beginning; - so if we get 'no such order' here, it - must be read as "no PAID order" */ - return TALER_MHD_reply_with_error ( - connection, - MHD_HTTP_CONFLICT, - TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_ORDER_UNPAID, - hc->infix); - } + /* We know the order exists from the + "lookup_contract_terms" at the beginning; + so if we get 'no such order' here, it + must be read as "no PAID order" */ + return TALER_MHD_reply_with_error ( + connection, + MHD_HTTP_CONFLICT, + TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_ORDER_UNPAID, + hc->infix); case TALER_MERCHANTDB_RS_SUCCESS: { enum GNUNET_DB_QueryStatus qs; |