GooglePayPaymentMethodLauncher

class 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

Constructor to be used when launching GooglePayPaymentMethodLauncher from an Activity. This constructor must be called no later than Activity#onCreate().

Link 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(isRequired: Boolean, format: GooglePayPaymentMethodLauncher.BillingAddressConfig.Format, isPhoneNumberRequired: Boolean) : Parcelable
Link copied to clipboard
object Companion
Link copied to clipboard
data class Config @JvmOverloads constructor(environment: GooglePayEnvironment, merchantCountryCode: String, merchantName: String, isEmailRequired: Boolean, billingAddressConfig: GooglePayPaymentMethodLauncher.BillingAddressConfig, existingPaymentMethodRequired: Boolean) : Parcelable
Link copied to clipboard
annotation class ErrorCode

Error codes representing the possible error types for Result.Failed. See the corresponding Result.Failed.error message for more details.

Link copied to clipboard
fun interface ReadyCallback
Link copied to clipboard
sealed class Result : Parcelable
Link copied to clipboard
fun interface ResultCallback

Functions

Link copied to clipboard
fun present(currencyCode: String, amount: Int = 0, transactionId: String? = null)

Present the Google Pay UI.