Companion

object Companion

Functions

Link copied to clipboard
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.

Link copied to clipboard
fun hasGooglePayJava(context: Context, supportedNetworks: List<PaymentMethodType>, authenticationMethods: List<GooglePayConfig.AuthenticationMethodType>, existingPaymentMethodRequired: Boolean, areCreditCardsAllowed: Boolean, arePrepaidCardsAllowed: Boolean, isTesting: Boolean): LiveData<Boolean>

As the Kotlin version uses coroutines because the Google's method to check availability is asynchronous, this is a workaround of the same method but for Java developers.