performPurchase
abstract suspend fun performPurchase(activity: Activity, params: PaywallPurchaseLogicParams): PurchaseLogicResult
Performs an in-app purchase with the given purchase params.
The PaywallPurchaseLogicParams contains the package to purchase along with product change information and the specific subscription option (offer) configured in the paywall.
If a purchase is successful, syncPurchases will automatically be called by RevenueCat to update our database. However, if you are using Amazon's store, you must call syncAmazonPurchase in your code.
Return
A PurchaseLogicResult object containing the outcome of the purchase operation.
Parameters
activity
The current Android Activity triggering the purchase.
params
The purchase params containing the package, product change information, and offer details.