Google Pay Context
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
Link copied to clipboard
constructor(activity: ComponentActivity, readyCallback: ReadyCallback? = null, resultCallback: ResultCallback? = null, merchantName: String? = null, merchantCountryCode: String? = null)
Constructor for using this class from an Activity.
constructor(fragment: Fragment, readyCallback: ReadyCallback? = null, resultCallback: ResultCallback? = null, merchantName: String? = null, merchantCountryCode: String? = null)
Constructor for using this class from a Fragment.
Properties
Link copied to clipboard
Optional callback to be notified when Google Pay is ready. Alternatively, you can check if Google Pay is ready by checking the isReady property
Link copied to clipboard
Callback to get the results of the Google Pay flow. If this isn't set there is no way to get the resulting payment method. It can be passed in to the constructor or manually set after creation, but must be set prior to calling GooglePayContext.present