GooglePayClient

Used to create and tokenize Google Pay payment methods. For more information see the documentation

Constructors

Link copied to clipboard
constructor(context: Context, authorization: String)

Initializes a new GooglePayClient instance

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Start the Google Pay payment flow. This will return GooglePayPaymentAuthRequestParams that are used to present Google Pay payment sheet in GooglePayLauncher.launch

Link copied to clipboard

Get Braintree specific tokenization parameters for a Google Pay. Useful for when full control over the PaymentDataRequest is required.

fun getTokenizationParameters(configuration: Configuration, authorization: Authorization): PaymentMethodTokenizationParameters
Link copied to clipboard

Before starting the Google Pay flow, use this method to check whether the Google Pay API is supported and set up on the device. When the callback is called with true, show the Google Pay button. When it is called with false, display other checkout options.

Link copied to clipboard

After a user successfully authorizes Google Pay payment via GooglePayClient.createPaymentAuthRequest, this method should be invoked to tokenize the payment method to retrieve a PaymentMethodNonce

fun tokenize(paymentData: PaymentData, callback: GooglePayTokenizeCallback)

Call this method when you've received a successful PaymentData response from a direct Google Play Services integration to get a GooglePayCardNonce or PayPalAccountNonce.