summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/taler-merchant-httpd.c6
-rw-r--r--src/backend/taler-merchant-httpd_get-orders-ID.c1
-rw-r--r--src/backend/taler-merchant-httpd_private-get-orders-ID.c3
3 files changed, 9 insertions, 1 deletions
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c
index 3968d6b2..e5d37a6c 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -842,6 +842,12 @@ url_handler (void *cls,
.have_id_segment = true,
.handler = &TMH_private_get_orders_ID
},
+ /* GET /orders: */
+ {
+ .url_prefix = "/orders",
+ .method = MHD_HTTP_METHOD_GET,
+ .handler = &TMH_private_get_orders
+ },
/* POST /orders/$ID/refund: */
{
.url_prefix = "/orders/",
diff --git a/src/backend/taler-merchant-httpd_get-orders-ID.c b/src/backend/taler-merchant-httpd_get-orders-ID.c
index 4c88ffcd..2b1117a4 100644
--- a/src/backend/taler-merchant-httpd_get-orders-ID.c
+++ b/src/backend/taler-merchant-httpd_get-orders-ID.c
@@ -645,6 +645,7 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
god->sc.con = connection;
god->ec = TALER_EC_NONE;
god->hc = hc;
+ god->order_id = order_id;
{
const char *cts;
diff --git a/src/backend/taler-merchant-httpd_private-get-orders-ID.c b/src/backend/taler-merchant-httpd_private-get-orders-ID.c
index 02fda297..d413f71b 100644
--- a/src/backend/taler-merchant-httpd_private-get-orders-ID.c
+++ b/src/backend/taler-merchant-httpd_private-get-orders-ID.c
@@ -902,7 +902,8 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh,
TALER_EC_GET_ORDERS_DB_FETCH_PAYMENT_STATUS,
"DB error fetching payment status");
}
- if (! paid)
+ if ((! paid) &&
+ (NULL != gorc->session_id))
{
char *already_paid_order_id;