aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorpriscilla <priscilla.huang@efrei.net>2022-12-30 08:50:16 -0500
committerpriscilla <priscilla.huang@efrei.net>2022-12-30 08:50:16 -0500
commit73fdf47728e26d8625a85441b8523bca0176868f (patch)
treed557bd0c220db03fb9a4af67c36d22803eff0f5b /src/include
parent2c19f6a6fb180f059fcaeb193dd387c4d6af21b1 (diff)
testing using templates
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_merchant_service.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index 44793d4c..b5dae98f 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -1365,7 +1365,7 @@ struct TALER_MERCHANT_PostOrdersReply
/**
* Callbacks of this type are used to serve the result of submitting a
- * POST /orders request to a merchant.
+ * POST /using-templates and POST /orders request to a merchant.
*
* @param cls closure
* @param por response details
@@ -4371,18 +4371,6 @@ TALER_MERCHANT_template_delete_cancel (
struct TALER_MERCHANT_TemplateDeleteHandle *tdh);
/**
- * Function called with the result of the POST /using-templates operation.
- *
- * @param cls closure
- * @param hr HTTP response details
- */
-typedef void
-(*TALER_MERCHANT_UsingTemplatesPostCallback)(
- void *cls,
- const struct TALER_MERCHANT_HttpResponse *hr);
-// FIXME: should be: const struct TALER_MERCHANT_PostOrdersReply *por);
-
-/**
* Make a POST /using-templates request to add an using template
*
* @param ctx the context
@@ -4400,7 +4388,7 @@ TALER_MERCHANT_using_templates_post (
const char *template_id,
const char *summary,
const struct TALER_Amount *amount,
- TALER_MERCHANT_UsingTemplatesPostCallback cb,
+ TALER_MERCHANT_PostOrdersCallback cb,
void *cb_cls);
@@ -4413,6 +4401,20 @@ void
TALER_MERCHANT_using_templates_post_cancel (
struct TALER_MERCHANT_UsingTemplatesPostHandle *utph);
+/**
+ * Function called when we're done processing the
+ * HTTP POST /using-template request to create an order.
+ *
+ * @param cls the `struct TALER_MERCHANT_PostOrdersHandle or TALER_MERCHANT_UsingTemplatesPostHandle`
+ * @param response_code HTTP response code, 0 on error
+ * @param response response body, NULL if not JSON
+ */
+void
+TALER_MERCHANT_handle_post_using_templates_create_order (void *cb_cls,
+ TALER_MERCHANT_PostOrdersCallback cb,
+ long response_code,
+ const json_t *json);
+
/* ********************* /webhooks *********************** */