item_state_t
This enumeration defines the possible states of a digital good.
Synopsis:
#include <bps/paymentservice.h>
typedef enum {
ITEM_STATE_OWNED = 0
ITEM_STATE_NEW_SUBSCRIPTION
ITEM_STATE_SUBSCRIPTION_REFUNDED
ITEM_STATE_SUBSCRIPTION_CANCELLED
ITEM_STATE_SUBSCRIPTION_RENEWED
ITEM_STATE_UNKNOWN
} item_state_t;
Data:
- ITEM_STATE_OWNED
- Indicates that the digital good is not a subscription and is owned by the user.
- ITEM_STATE_NEW_SUBSCRIPTION
- Indicates that the user is currently subscribed to the digital good.
-
It's a new subscription.
- ITEM_STATE_SUBSCRIPTION_REFUNDED
- Indicates that the subscription digital good has been refunded.
-
The user is no longer subscribed.
- ITEM_STATE_SUBSCRIPTION_CANCELLED
- Indicates that the subscription has been cancelled.
-
It is possible that the subscription is still active. You can use the paymentservice_check_existing() function to determine if the subscription is still active or compare the end date with the current date.
- ITEM_STATE_SUBSCRIPTION_RENEWED
- Indicates that the user is currently subscribed and they have renewed the subscription.
- ITEM_STATE_UNKNOWN
- Indicates that the state of the item is unknown.
Library:
libbpsDescription:
For example, whether the digital good item is owned, subscribed, cancelled, renewed, or unknown.