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.h45
1 files changed, 40 insertions, 5 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index f59cfec0..1ff5fde3 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -1632,24 +1632,46 @@ struct TALER_MERCHANT_RefundOrderDetail
/**
+ * Status of an order.
+ */
+enum TALER_MERCHANT_OrderStatusCode
+{
+ /**
+ * The order was paid.
+ */
+ TALER_MERCHANT_OSC_PAID = 1,
+
+ /**
+ * The order was claimed but not yet paid.
+ */
+ TALER_MERCHANT_OSC_CLAIMED = 2,
+
+ /**
+ * The order was never paid or claimed.
+ */
+ TALER_MERCHANT_OSC_UNPAID = 3
+};
+
+
+/**
* Details about the status of an order.
*/
struct TALER_MERCHANT_OrderStatusResponse
{
/**
- * true if the payment is settled, false if not settled.
+ * Status of the order.
*/
- bool paid;
+ enum TALER_MERCHANT_OrderStatusCode status;
/**
- * Details depending on the payment status given in @e paid.
+ * Details depending on the payment status given in @e status.
*/
union
{
/**
- * Details provided if @e paid is #GNUNET_YES.
+ * Details provided if @e status is #TALER_MERCHANT_OSC_PAID.
*/
struct
{
@@ -1729,7 +1751,20 @@ struct TALER_MERCHANT_OrderStatusResponse
} paid;
/**
- * Details provided if @e paid is #GNUNET_NO.
+ * Details provided if @e status is #TALER_MERCHANT_OSC_CLAIMED.
+ */
+ struct
+ {
+
+ /**
+ * The full contract terms of the claimed order (including client nonce from claiming).
+ */
+ const json_t *contract_terms;
+
+ } claimed;
+
+ /**
+ * Details provided if @e status is #TALER_MERCHANT_OSC_UNPAID.
*/
struct
{