-
- All Implemented Interfaces:
public class GooglePayHelper
Contains helper static methods for dealing with the Google Pay Payments API.
-
-
Method Summary
Modifier and Type Method Description static PaymentsClient
getPaymentsClient(@NonNull() Context context, @NonNull() Connect.ProviderMode providerMode)
Returns a client for interacting with the Google Pay API based on provider mode. static void
isReadyToPayWithGoogle(@NonNull() Context context, @NonNull() Connect.ProviderMode providerMode, @NonNull() String paymentDataRequestJson, @NonNull() OnCompleteListener<Boolean> completeListener)
Makes a check that Google Pay is ready for payment. -
-
Method Detail
-
getPaymentsClient
@NonNull() static PaymentsClient getPaymentsClient(@NonNull() Context context, @NonNull() Connect.ProviderMode providerMode)
Returns a client for interacting with the Google Pay API based on provider mode.
- Parameters:
context
- The context.providerMode
- The Connect.ProviderMode.
-
isReadyToPayWithGoogle
static void isReadyToPayWithGoogle(@NonNull() Context context, @NonNull() Connect.ProviderMode providerMode, @NonNull() String paymentDataRequestJson, @NonNull() OnCompleteListener<Boolean> completeListener)
Makes a check that Google Pay is ready for payment.
- Parameters:
context
- The context.providerMode
- The Connect.ProviderMode.paymentDataRequestJson
- The payment data request in Json format.completeListener
- The completion listener.
-
-
-
-