makePurchase
fun makePurchase(activity: Activity, product: AdaptyPaywallProduct, subscriptionUpdateParams: AdaptySubscriptionUpdateParameters? = null, isOfferPersonalized: Boolean = false, callback: ResultCallback<AdaptyPurchaseResult>)
To make the purchase, you have to call this method.
Should not be called before activate
Parameters
activity
An Activity instance.
product
An AdaptyPaywallProduct object retrieved from the paywall.
subscriptionUpdateParams
An AdaptySubscriptionUpdateParameters object, used when you need a subscription to be replaced with another one, read more.
isOfferPersonalized
Indicates whether the price is personalized, read more.
callback
The result includes an AdaptyPurchaseResult object, which provides details about the purchase. If the result is AdaptyPurchaseResult.Success, it also includes the user's profile. The profile, in turn, includes details about access levels, subscriptions, and non-subscription purchases. Generally, you have to check only access level status to determine whether the user has premium access to the app.