Automatic Purchase Controller
The PurchaseController used when the app doesn't provide one.
It doesn't own a billing client: purchases, queries and acknowledgements go through store, the SDK's single Play Billing connection, so the SDK sees every purchase this controller makes.
Functions
Link copied to clipboard
open suspend fun purchase(activity: Activity, product: StoreProduct, basePlanId: String?, offerId: String?): PurchaseResult
open suspend override fun purchase(activity: Activity, productDetails: ProductDetails, basePlanId: String?, offerId: String?): PurchaseResult
Called when the user initiates purchasing of a product.
open suspend override fun purchase(activity: Activity, product: StoreProduct, basePlanId: String?, offerId: String?, replacement: ProductReplacement?): PurchaseResult
Called when the user initiates purchasing of a product that should replace one of their existing subscriptions, e.g. an upgrade, downgrade or plan switch.
Link copied to clipboard
Called when the user initiates a restore.