onPurchaseInitiated
abstract fun onPurchaseInitiated(product: AdaptyPaywallProduct, paywall: AdaptyPaywall, context: Context, onStartPurchase: AdaptyUiObserverModeHandler.PurchaseStartCallback, onFinishPurchase: AdaptyUiObserverModeHandler.PurchaseFinishCallback)
This callback is invoked when the user initiates a purchase. You can trigger your custom purchase flow in response to this callback, read more.
Parameters
product
An AdaptyPaywallProduct of the purchase.
paywall
An AdaptyPaywall within which the purchase is initiated.
context
A UI Context within which the the purchase is initiated.
onStartPurchase
A PurchaseStartCallback that should be invoked to notify AdaptyUI that the purchase is started.
From Kotlin:
onStartPurchase()
Content copied to clipboard
From Java:
onStartPurchase.invoke()
Content copied to clipboard
onFinishPurchase
A PurchaseFinishCallback that should be invoked to notify AdaptyUI that the purchase is finished successfully or not, or the purchase is canceled.
From Kotlin:
onFinishPurchase()
Content copied to clipboard
From Java:
onFinishPurchase.invoke()
Content copied to clipboard