summaryrefslogtreecommitdiff
path: root/src/include/taler_merchant_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-10-02 20:20:08 +0200
committerChristian Grothoff <christian@grothoff.org>2020-10-02 20:20:20 +0200
commite24064063f5d7dc36ab14e1f911708e6d981a10e (patch)
tree0c46d0fe2e8f6401eef0c40256d0c434fc00c1f5 /src/include/taler_merchant_service.h
parentfc51e020796e4faa5435520adb5e3ca67ee6105f (diff)
downloadmerchant-e24064063f5d7dc36ab14e1f911708e6d981a10e.tar.gz
merchant-e24064063f5d7dc36ab14e1f911708e6d981a10e.tar.bz2
merchant-e24064063f5d7dc36ab14e1f911708e6d981a10e.zip
implement #6616 claim status in /private/orders/ID handler
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
{