Companion

object Companion

Functions

Link copied to clipboard

Use this method to get the latest changes on Transaction. It replaces the Transaction.listener. When using this method, you should not initialise the Transaction.listener or you will receive results twice. It also works when your Activity is destroyed in the background by the system during payment, unlike the Transaction.listener. You should call this method on the android.app.Activity.onCreate lifecycle method (or equivalent on androidx.fragment.app.Fragment) to make sure the result is always available when your Activity is created and also recreated by the system.

Link copied to clipboard

Use this method to unsubscribe an Activity from receiving results. You should call this method on the android.app.Activity.onDestroy lifecycle method (or equivalent on androidx.fragment.app.Fragment) to make sure the result is not sent anymore to the Activity or Fragment.