Selling digital goods
Cascades provides a set of Payment Service classes that you can use to manage purchases and subscriptions directly in your app.
You can use the PaymentManager class to initiate a purchase or find out about past purchases or existing subscriptions. The PaymentConnectionMode class allows you to specify a test connection mode to avoid accidental purchases when you test your app. You can use the PaymentReply class to understand whether a PaymentManager request succeeds or fails by calling the isError() function.
You can use the following classes and responses with PaymentManager transactions:
A response to PaymentManager::requestCancelSubscription(). CancelSubscriptionReply is a subclass of PaymentReply.
A base class for responses to PaymentManager requests. PurchaseReply, PriceReply, and SubscriptionStatusReply are subclasses of DigitalGoodReply, which is a subclass of PaymentReply.
An enumerated type that provides the possible states of a digital good, including whether the good is owned or a subscription, and details about the state of the subscription.
A response to PaymentManager::requestExistingPurchases(). ExistingPurchasesReply is a subclass of PaymentReply.
An enumerated type that provides the possible errors that the Payment Service can return.
A response to PaymentManager::requestPrice(). PriceReply is a subclass of DigitalGoodReply.
A receipt issued when the purchase of a digital good is successful. This receipt includes the updated DigitalGoodState.
A response to PaymentManager::requestSubscriptionStatus(). SubscriptionStatusReply is a subclass of DigitalGoodReply.
A response to PaymentManager::requestSubscriptionTerms(). SubscriptionTermsReply is a subclass of PriceReply.
To get started adding digital goods to your app, see Setting up the Payment Service.
Last modified: 2013-12-21