From 3493795065b8fde49a5a4c06e5302b2afd03685a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 2 May 2020 19:25:05 +0200 Subject: implement /refund handling --- src/backend/taler-merchant-httpd.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/backend/taler-merchant-httpd.c') diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c index 0149b8b0..27541b53 100644 --- a/src/backend/taler-merchant-httpd.c +++ b/src/backend/taler-merchant-httpd.c @@ -42,7 +42,10 @@ #include "taler-merchant-httpd_private-post-products.h" #include "taler-merchant-httpd_private-post-products-ID-lock.h" #include "taler-merchant-httpd_private-post-orders.h" +#include "taler-merchant-httpd_private-post-orders-ID-refund.h" +#include "taler-merchant-httpd_post-orders-ID-abort.h" #include "taler-merchant-httpd_post-orders-ID-claim.h" +#include "taler-merchant-httpd_post-orders-ID-pay.h" /** @@ -816,6 +819,14 @@ url_handler (void *cls, .method = MHD_HTTP_METHOD_POST, .handler = &TMH_private_post_orders }, + /* POST /orders/$ID/refund: */ + { + .url_prefix = "/orders/", + .url_suffix = "refund", + .method = MHD_HTTP_METHOD_POST, + .have_id_segment = true, + .handler = &TMH_private_post_orders_ID_refund + }, { NULL } @@ -844,6 +855,14 @@ url_handler (void *cls, .skip_instance = true, .handler = &MH_handler_config }, + /* POST /orders/$ID/abort: */ + { + .url_prefix = "/orders/", + .have_id_segment = true, + .url_suffix = "abort", + .method = MHD_HTTP_METHOD_POST, + .handler = &TMH_post_orders_ID_abort + }, /* POST /orders/$ID/claim: */ { .url_prefix = "/orders/", @@ -852,6 +871,14 @@ url_handler (void *cls, .method = MHD_HTTP_METHOD_POST, .handler = &TMH_post_orders_ID_claim }, + /* POST /orders/$ID/pay: */ + { + .url_prefix = "/orders/", + .have_id_segment = true, + .url_suffix = "pay", + .method = MHD_HTTP_METHOD_POST, + .handler = &TMH_post_orders_ID_pay + }, { NULL } -- cgit v1.2.3