From e24064063f5d7dc36ab14e1f911708e6d981a10e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 2 Oct 2020 20:20:08 +0200 Subject: implement #6616 claim status in /private/orders/ID handler --- src/include/taler_merchant_service.h | 45 ++++++++++++++++++++++++++++++++---- 1 file changed, 40 insertions(+), 5 deletions(-) (limited to 'src/include/taler_merchant_service.h') 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 @@ -1631,6 +1631,28 @@ 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. */ @@ -1638,18 +1660,18 @@ 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 { -- cgit v1.2.3