GooglePayLauncher

constructor(activity: ComponentActivity, config: Configuration, readyCallback: ReadyCallback? = null, resultCallback: ResultCallback? = null)

Constructor for using this class from a ComponentActivity.

Parameters

activity

The activity that will be launching Google Pay

Important: This constructor must be called no later than ComponentActivity.onCreate

config

Configuration parameters for Google Pay. This can be changed/updated later via the GooglePayLauncher.config property

readyCallback

Called after determining whether Google Pay is available and ready on the device. This can also be set via the GooglePayLauncher.readyCallback property

resultCallback

Called with the final result of the Google Pay payment operation. If not passed in here, the corresponding GooglePayLauncher.resultCallback property must be set prior to calling present

Throws


constructor(fragment: Fragment, config: Configuration, readyCallback: ReadyCallback? = null, resultCallback: ResultCallback? = null)

Constructor for using this class from a Fragment.

Parameters

fragment

The fragment that will be launching Google Pay

Important: This constructor must be called no later than Fragment.onViewCreated

config

Configuration parameters for Google Pay. This can be changed/updated later via the GooglePayLauncher.config property

readyCallback

Called after determining whether Google Pay is available and ready on the device. This can also be set via the GooglePayLauncher.readyCallback property

resultCallback

Called with the final result of the Google Pay payment operation. If not passed in here, the corresponding GooglePayLauncher.resultCallback property must be set prior to calling present

Throws