GooglePayPaymentMethodLauncher
A drop-in class that presents a Google Pay sheet to collect a customer's payment details. When successful, will return a PaymentMethod via Result.Completed.paymentMethod.
Use GooglePayPaymentMethodLauncher for Jetpack Compose integrations.
See the Google Pay integration guide for more details.
Constructors
Link copied to clipboard
fun GooglePayPaymentMethodLauncher( activity: ComponentActivity, config: GooglePayPaymentMethodLauncher.Config, readyCallback: GooglePayPaymentMethodLauncher.ReadyCallback, resultCallback: GooglePayPaymentMethodLauncher.ResultCallback)
Content copied to clipboard
Constructor to be used when launching GooglePayPaymentMethodLauncher from an Activity. This constructor must be called no later than Activity#onCreate()
.
Link copied to clipboard
fun GooglePayPaymentMethodLauncher( fragment: Fragment, config: GooglePayPaymentMethodLauncher.Config, readyCallback: GooglePayPaymentMethodLauncher.ReadyCallback, resultCallback: GooglePayPaymentMethodLauncher.ResultCallback)
Content copied to clipboard
Constructor to be used when launching GooglePayPaymentMethodLauncher from a Fragment. This constructor must be called no later than Fragment#onViewCreated()
.
Types
Link copied to clipboard
data class BillingAddressConfig @JvmOverloads constructor( val isRequired: Boolean = false, val format: GooglePayPaymentMethodLauncher.BillingAddressConfig.Format = Format.Min, val isPhoneNumberRequired: Boolean = false) : Parcelable
Content copied to clipboard
Link copied to clipboard
data class Config @JvmOverloads constructor( val environment: GooglePayEnvironment, val merchantCountryCode: String, val merchantName: String, var isEmailRequired: Boolean = false, var billingAddressConfig: GooglePayPaymentMethodLauncher.BillingAddressConfig = BillingAddressConfig(), var existingPaymentMethodRequired: Boolean = true) : Parcelable
Content copied to clipboard
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.TYPE] )
Content copied to clipboard
Error codes representing the possible error types for Result.Failed. See the corresponding Result.Failed.error message for more details.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard