performPurchaseWithCompletion
abstract fun performPurchaseWithCompletion(activity: Activity, params: PaywallPurchaseLogicParams, completion: (PurchaseLogicResult) -> Unit)
Performs an in-app purchase with additional purchase params, using a completion callback.
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.
Parameters
activity
The current Android Activity triggering the purchase.
params
The purchase params containing the package, product change information, and offer details.
completion
A callback function that receives a PurchaseLogicResult object containing the outcome of the purchase operation.