onPurchaseFinished

abstract fun onPurchaseFinished(purchaseResult: AdaptyPurchaseResult, product: AdaptyPaywallProduct, context: Context)

This callback is invoked to inform on a canceled, successful, and pending purchase.

The default implementation is a no-op. Check the purchaseResult and navigate back from the flow yourself if needed.

Parameters

purchaseResult

An AdaptyPurchaseResult object containing details about the purchase. If the result is AdaptyPurchaseResult.Success, it also includes the user's profile.

product

An AdaptyPaywallProduct of the purchase.

context

A UI Context within which the event occurred.