summaryrefslogtreecommitdiff
path: root/src/include/taler_merchant_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/taler_merchant_service.h')
-rw-r--r--src/include/taler_merchant_service.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index 213ea466..0e3ec5c4 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -2026,6 +2026,64 @@ TALER_MERCHANT_order_pay_cancel (struct TALER_MERCHANT_OrderPayHandle *oph);
/**
+ * @brief Handle to a POST /orders/$ID/paid operation at a merchant.
+ */
+struct TALER_MERCHANT_OrderPaidHandle;
+
+
+/**
+ * Callbacks of this type are used to serve the result of submitting a
+ * POST /orders/$ID/paid request to a merchant.
+ *
+ * @param cls closure
+ * @param hr HTTP response details
+ */
+typedef void
+(*TALER_MERCHANT_OrderPaidCallback) (
+ void *cls,
+ const struct TALER_MERCHANT_HttpResponse *hr);
+
+
+/**
+ * Send proof of payment to a merchant.
+ *
+ * This is a PUBLIC API, albeit in this form useful for the frontend,
+ * in case the frontend is proxying the request.
+ *
+ * @param ctx execution context
+ * @param merchant_url base URL of the merchant
+ * @param order_id which order should be paid
+ * @param session_id session to pay for, or NULL for none
+ * @param h_contract_terms hash of the contract terms
+ * @param merchant_sig signature from the merchant
+ * affirming payment, or NULL on errors
+ * @param paid_cb the callback to call when a reply for this request is available
+ * @param paid_cb_cls closure for @a paid_cb
+ * @return a handle for this request
+ */
+struct TALER_MERCHANT_OrderPaidHandle *
+TALER_MERCHANT_order_paid (
+ struct GNUNET_CURL_Context *ctx,
+ const char *merchant_url,
+ const char *order_id,
+ const char *session_id,
+ const struct GNUNET_HashCode *h_contract_terms,
+ const struct TALER_MerchantSignatureP *merchant_sig,
+ TALER_MERCHANT_OrderPaidCallback paid_cb,
+ void *paid_cb_cls);
+
+
+/**
+ * Cancel POST /orders/$ID/paid operation.
+ *
+ * @param oph operation to cancel
+ */
+void
+TALER_MERCHANT_order_paid_cancel (
+ struct TALER_MERCHANT_OrderPaidHandle *oph);
+
+
+/**
* Handle for an POST /orders/$ID/abort operation.
*/
struct TALER_MERCHANT_OrderAbortHandle;