GooglePayLauncher

constructor(activity: ComponentActivity, config: GooglePayConfig, readyCallback: GooglePayReadyCallback? = null, resultCallback: GooglePayResultCallback? = null)

Constructor for using this class from a ComponentActivity.


Important:

This must be called no later than ComponentActivity.onCreate

Parameters

activity

The activity that is launching Google Pay

config

Configuration parameters for Google Pay

readyCallback

Called whenever the Google Pay readiness changes

resultCallback

Called with the final result of the Google Pay payment operation


constructor(fragment: Fragment, config: GooglePayConfig, readyCallback: GooglePayReadyCallback? = null, resultCallback: GooglePayResultCallback? = null)

Constructor for using this class from a Fragment.


Important:

This must be called no later than Fragment.onViewCreated

Parameters

fragment

The fragment that is launching Google Pay

config

Configuration parameters for Google Pay

readyCallback

Called whenever the Google Pay readiness changes

resultCallback

Called with the final result of the Google Pay payment operation