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 simply calling onBackPressed method of the Activity the AdaptyPaywallView is attached to.

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.