GooglePayContext

class GooglePayContext : IGooglePayContext

A drop-in class that presents a Google Pay sheet to collect a customer's payment details. When successful, will return an IPaymentMethod via Result.Completed.paymentMethod

Constructors

GooglePayContext
Link copied to clipboard
fun GooglePayContext(activity: ComponentActivity, readyCallback: ReadyCallback, resultCallback: ResultCallback, merchantName: String? = null, merchantCountryCode: String? = null)

Constructor for using this class from an Activity.

GooglePayContext
Link copied to clipboard
fun GooglePayContext(fragment: Fragment, readyCallback: ReadyCallback, resultCallback: ResultCallback, merchantName: String? = null, merchantCountryCode: String? = null)

Constructor for using this class from a Fragment.

Properties

isReady
Link copied to clipboard
open override val isReady: Boolean

True if Google Pay is available and ready to present

Functions

present
Link copied to clipboard
open override fun present()
open override fun present(currencyCode: String)
open override fun present(currencyCode: String, amount: Int)
open override fun present(currencyCode: String, amount: Int, transactionId: String?)

Present the Google Pay UI. If isReady is false then this method is a no-op