Package com.adyen.checkout.googlepay
Class GooglePayComponent
-
- All Implemented Interfaces:
-
com.adyen.checkout.action.core.internal.ActionHandlingComponent,com.adyen.checkout.components.core.internal.ActivityResultHandlingComponent,com.adyen.checkout.components.core.internal.Component,com.adyen.checkout.components.core.internal.PaymentComponent,com.adyen.checkout.components.core.internal.ResultHandlingComponent,com.adyen.checkout.ui.core.internal.ui.ViewableComponent
public final class GooglePayComponent extends ViewModel implements PaymentComponent, ActivityResultHandlingComponent, ViewableComponent, ActionHandlingComponent
A PaymentComponent that supports the PaymentMethodTypes.GOOGLE_PAY and PaymentMethodTypes.GOOGLE_PAY_LEGACY payment methods.
-
-
Field Summary
Fields Modifier and Type Field Description public final static GooglePayComponentProviderPROVIDERpublic final static List<String>PAYMENT_METHOD_TYPESprivate final ComponentDelegatedelegateprivate final Flow<ComponentViewType>viewFlow
-
Method Summary
Modifier and Type Method Description ComponentDelegategetDelegate()Flow<ComponentViewType>getViewFlow()final UnitstartGooglePayScreen(Activity activity, Integer requestCode)Start the GooglePay screen which will return the result to the provided Activity. final GooglePayButtonParametersgetGooglePayButtonParameters()Returns some of the parameters required to initialize the Google Pay button. UnithandleActivityResult(Integer resultCode, Intent data)Handle the result from the GooglePay screen that was started by . UnitsetInteractionBlocked(Boolean isInteractionBlocked)-
Methods inherited from class androidx.lifecycle.ViewModel
addCloseable, addCloseable, getCloseable -
Methods inherited from class com.adyen.checkout.action.core.internal.ActionHandlingComponent
canHandleAction, handleAction, handleIntent, setOnRedirectListener -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getDelegate
ComponentDelegate getDelegate()
-
getViewFlow
Flow<ComponentViewType> getViewFlow()
-
startGooglePayScreen
final Unit startGooglePayScreen(Activity activity, Integer requestCode)
Start the GooglePay screen which will return the result to the provided Activity.
- Parameters:
activity- The activity to start the screen and later receive the result.requestCode- The code that will be returned on the Activity.onActivityResult
-
getGooglePayButtonParameters
final GooglePayButtonParameters getGooglePayButtonParameters()
Returns some of the parameters required to initialize the Google Pay button.
-
handleActivityResult
Unit handleActivityResult(Integer resultCode, Intent data)
Handle the result from the GooglePay screen that was started by .startGooglePayScreen.
- Parameters:
resultCode- The result code from the Activity.onActivityResultdata- The data intent from the Activity.onActivityResult
-
setInteractionBlocked
Unit setInteractionBlocked(Boolean isInteractionBlocked)
-
-
-
-