Client for interacting with the Google Pay API. See GoogleApi
for details about how the connection between your app and Google Play services is
managed.
| Task<Boolean> |
isReadyToPay(IsReadyToPayRequest
request)
Determines if the user can make payments using the Google Pay API.
|
| Task<PaymentData> |
loadPaymentData(PaymentDataRequest
request)
Requests
PaymentData,
which contains the necessary information to complete a payment.
|
Determines if the user can make payments using the Google Pay API. We recommend to call this method before showing an option to pay using the Google Pay API.
IsReadyToPayRequest.Note that the requirements mentioned above are non-exhaustive and may change over time.
| request | An instance of IsReadyToPayRequest
used to specify additional filtering criteria. |
|---|
Requests PaymentData,
which contains the necessary information to complete a payment.
Note that this action will generally require UI to be shown to the users so they can select a payment method.
This API conforms to the protocol defined by AutoResolveHelper.
Instead of handling the returned exceptions yourself when the Google Pay payment sheet
needs to be shown (i.e. ResolvableApiException),
you should use the AutoResolveHelper
to pipe the results back to
onActivityResult(int, int, android.content.Intent). This implementation
frees your code from having to handle receiving the result differently depending on the
display of the Google Pay payment sheet.
| request | An instance of PaymentDataRequest
used to specify additional settings. |
|---|