summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_get-orders-ID.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-08-16 14:06:46 +0200
committerChristian Grothoff <christian@grothoff.org>2022-08-16 14:06:46 +0200
commitc1d0a7d2e64fd7c6bd041a5259cf212b3aabd414 (patch)
tree8b5c4d05187336048f13c1e500501f6e6bbda727 /src/backend/taler-merchant-httpd_get-orders-ID.c
parent19010a2f6d658e78ded8abb02995d9154d22bbf3 (diff)
downloadmerchant-c1d0a7d2e64fd7c6bd041a5259cf212b3aabd414.tar.gz
merchant-c1d0a7d2e64fd7c6bd041a5259cf212b3aabd414.tar.bz2
merchant-c1d0a7d2e64fd7c6bd041a5259cf212b3aabd414.zip
-move templating logic to libtalertemplating of exchange
Diffstat (limited to 'src/backend/taler-merchant-httpd_get-orders-ID.c')
-rw-r--r--src/backend/taler-merchant-httpd_get-orders-ID.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/backend/taler-merchant-httpd_get-orders-ID.c b/src/backend/taler-merchant-httpd_get-orders-ID.c
index 53260f67..5d229fc2 100644
--- a/src/backend/taler-merchant-httpd_get-orders-ID.c
+++ b/src/backend/taler-merchant-httpd_get-orders-ID.c
@@ -25,12 +25,12 @@
#include <taler/taler_signatures.h>
#include <taler/taler_dbevents.h>
#include <taler/taler_json_lib.h>
+#include <taler/taler_templating_lib.h>
#include <taler/taler_exchange_service.h>
#include "taler-merchant-httpd_exchanges.h"
#include "taler-merchant-httpd_get-orders-ID.h"
#include "taler-merchant-httpd_mhd.h"
#include "taler-merchant-httpd_qr.h"
-#include "taler-merchant-httpd_templating.h"
/**
* How often do we retry DB transactions on serialization failures?
@@ -691,12 +691,12 @@ send_pay_request (struct GetOrderData *god,
qr),
GNUNET_JSON_pack_string ("order_summary",
get_order_summary (god)));
- res = TMH_return_from_template (god->sc.con,
- MHD_HTTP_PAYMENT_REQUIRED,
- "request_payment",
- god->hc->instance->settings.id,
- taler_pay_uri,
- context);
+ res = TALER_TEMPLATING_reply (god->sc.con,
+ MHD_HTTP_PAYMENT_REQUIRED,
+ "request_payment",
+ god->hc->instance->settings.id,
+ taler_pay_uri,
+ context);
if (GNUNET_SYSERR == res)
{
GNUNET_break (0);
@@ -1460,12 +1460,12 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
uri),
GNUNET_JSON_pack_string ("taler_refund_qrcode_svg",
qr));
- res = TMH_return_from_template (god->sc.con,
- MHD_HTTP_OK,
- "offer_refund",
- hc->instance->settings.id,
- uri,
- context);
+ res = TALER_TEMPLATING_reply (god->sc.con,
+ MHD_HTTP_OK,
+ "offer_refund",
+ hc->instance->settings.id,
+ uri,
+ context);
json_decref (context);
}
GNUNET_free (uri);
@@ -1484,12 +1484,12 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
&god->refund_amount),
TALER_JSON_pack_amount ("refund_taken",
&god->refund_taken));
- res = TMH_return_from_template (god->sc.con,
- MHD_HTTP_OK,
- "show_order_details",
- hc->instance->settings.id,
- NULL,
- context);
+ res = TALER_TEMPLATING_reply (god->sc.con,
+ MHD_HTTP_OK,
+ "show_order_details",
+ hc->instance->settings.id,
+ NULL,
+ context);
json_decref (context);
}
if (GNUNET_SYSERR == res)