hasGooglePay

suspend fun hasGooglePay(context: Context, supportedNetworks: List<PaymentMethodType>, authenticationMethods: List<GooglePayConfig.AuthenticationMethodType> = DEFAULT_AUTHENTICATION_METHODS, existingPaymentMethodRequired: Boolean = false, areCreditCardsAllowed: Boolean = true, arePrepaidCardsAllowed: Boolean = true, isTesting: Boolean = false): Boolean

Although the library automatically hides Google Pay if no cards are supported, this shows if Google Pay is available for the specified card acquirers and other options. See full list of options below.

Return

True if Google Pay is available on the device and false if it is unavailable.

Parameters

context

Android context

Options:

supportedNetworks

Supported card acquirers

authenticationMethods

Supported authentication methods (e.g. PAN_ONLY)

existingPaymentMethodRequired

If user has to have a payment method already added to Google Wallet (default is false)

areCreditCardsAllowed

If credit cards are allowed (default is true)

arePrepaidCardsAllowed

If prepaid cards are allowed (default is true)

isTesting

True if running on sandbox, false otherwise. (default is false)