GooglePayLauncher
Used to launch the Google Pay payment sheet from within an Android Fragment. This class must be instantiated before the Fragment is created.
Parameters
the Android Fragment from which you will launch the Google Pay payment sheet
a GooglePayLauncherCallback to receive the result of the Google Pay payment flow
Used to launch the Google Pay payment sheet from within an Android Activity. This class must be instantiated before the Activity is created.
Parameters
the Android Activity from which you will launch the Google Pay payment sheet
a GooglePayLauncherCallback to receive the result of the Google Pay payment flow
Used to launch the Google Pay payment sheet from a composable, or anywhere else a Fragment or ComponentActivity reference is not available. This class must be instantiated before the lifecycleOwner reaches the CREATED state.
Parameters
the ActivityResultRegistry to use for launching the Google Pay payment sheet
the LifecycleOwner used to control when the launcher is registered
an Android Context
a GooglePayLauncherCallback to receive the result of the Google Pay payment flow