Class SessionDropInService
-
- All Implemented Interfaces:
-
android.content.ComponentCallbacks,android.content.ComponentCallbacks2,com.adyen.checkout.dropin.BaseDropInServiceContract,com.adyen.checkout.dropin.SessionDropInServiceContract,com.adyen.checkout.dropin.internal.service.BaseDropInServiceInterface,com.adyen.checkout.dropin.internal.service.SessionDropInServiceInterface,kotlinx.coroutines.CoroutineScope
public class SessionDropInService extends BaseDropInService implements SessionDropInServiceInterface, SessionDropInServiceContract
Extend this service if you want to take over the sessions flow in Drop-in and make the required network calls to the Adyen Checkout APIs through your backend. Note that once you take over the sessions flow you have to handle the rest of the network calls yourself.
Make sure you define add your subclass of this SessionDropInService in your manifest file.
-
-
Field Summary
Fields Modifier and Type Field Description private final BooleanisFlowTakenOverprivate final CoroutineContextcoroutineContext
-
Constructor Summary
Constructors Constructor Description SessionDropInService()
-
Method Summary
Modifier and Type Method Description final BooleanisFlowTakenOver()Indicates whether you already took over the sessions flow in a previous action. final Unitinitialize(SessionModel sessionModel, String clientKey, Environment environment, Boolean isFlowTakenOver, AnalyticsManager analyticsManager)final UnitrequestPaymentsCall(PaymentComponentState<?> paymentComponentState)final UnitrequestDetailsCall(ActionComponentData actionComponentData)final UnitrequestBalanceCall(PaymentComponentState<?> paymentComponentState)final UnitrequestOrdersCall()final UnitrequestCancelOrder(OrderRequest order, Boolean isDropInCancelledByUser)UnitonRemoveStoredPaymentMethod(StoredPaymentMethod storedPaymentMethod)Only applicable to removing stored payment methods. -
Methods inherited from class com.adyen.checkout.dropin.internal.service.BaseDropInService
getAdditionalData, getCoroutineContext, observeResult, onAddressLookupCompletionCalled, onAddressLookupQueryChangedCalled, onBinLookupCalled, onBinValueCalled, onBind, onCreate, onDestroy, onRebind, onRedirectCalled, onStartCommand, onUnbind, requestRemoveStoredPaymentMethod, sendAddressLookupResult, sendBalanceResult, sendOrderResult, sendRecurringResult, sendResult -
Methods inherited from class com.adyen.checkout.dropin.BaseDropInServiceContract
onAddressLookupCompletion, onAddressLookupQueryChanged, onBinLookup, onBinValue, onRedirect -
Methods inherited from class com.adyen.checkout.dropin.SessionDropInServiceContract
onAdditionalDetails, onBalanceCheck, onOrderCancel, onOrderRequest, onSubmit -
Methods inherited from class android.content.ContextWrapper
bindIsolatedService, bindService, bindService, bindService, bindService, bindServiceAsUser, bindServiceAsUser, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingOrSelfUriPermissions, checkCallingPermission, checkCallingUriPermission, checkCallingUriPermissions, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, checkUriPermissions, clearWallpaper, createAttributionContext, createConfigurationContext, createContext, createContextForSplit, createDeviceContext, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, createWindowContext, createWindowContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getAttributionSource, getAttributionTag, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDataDir, getDatabasePath, getDeviceId, getDir, getDisplay, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFileStreamPath, getFilesDir, getMainExecutor, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getOpPackageName, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getParams, getResources, getSharedPreferences, getSystemService, getSystemServiceName, getTheme, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, isUiContext, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerComponentCallbacks, registerDeviceIdChangeListener, registerReceiver, registerReceiver, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeSelfPermissionsOnKill, revokeUriPermission, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setTheme, setWallpaper, setWallpaper, startActivities, startActivities, startActivity, startActivity, startForegroundService, startInstrumentation, startIntentSender, startIntentSender, startService, stopService, unbindService, unregisterComponentCallbacks, unregisterDeviceIdChangeListener, unregisterReceiver, updateServiceGroup -
Methods inherited from class android.content.Context
bindIsolatedService, getColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, revokeSelfPermissionOnKill, sendBroadcastWithMultiplePermissions -
Methods inherited from class android.app.Service
getApplication, getForegroundServiceType, onConfigurationChanged, onLowMemory, onStart, onTaskRemoved, onTimeout, onTrimMemory, startForeground, startForeground, stopForeground, stopForeground, stopSelf, stopSelf, stopSelfResult -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
isFlowTakenOver
final Boolean isFlowTakenOver()
Indicates whether you already took over the sessions flow in a previous action. This field could be useful if you are only taking over the flow in certain conditions and you want to know in a subsequent call whether you did take over the flow earlier or not.
-
initialize
final Unit initialize(SessionModel sessionModel, String clientKey, Environment environment, Boolean isFlowTakenOver, AnalyticsManager analyticsManager)
-
requestPaymentsCall
final Unit requestPaymentsCall(PaymentComponentState<?> paymentComponentState)
-
requestDetailsCall
final Unit requestDetailsCall(ActionComponentData actionComponentData)
-
requestBalanceCall
final Unit requestBalanceCall(PaymentComponentState<?> paymentComponentState)
-
requestOrdersCall
final Unit requestOrdersCall()
-
requestCancelOrder
final Unit requestCancelOrder(OrderRequest order, Boolean isDropInCancelledByUser)
-
onRemoveStoredPaymentMethod
Unit onRemoveStoredPaymentMethod(StoredPaymentMethod storedPaymentMethod)
Only applicable to removing stored payment methods. Use DropInConfiguration.Builder.setEnableRemovingStoredPaymentMethods to enable this feature.
In this method you should make the network call to tell your server to make a call to the DELETE /storedPaymentMethods endpoint. This method is called when the user initiates removing a stored payment method using the remove button.
We provide storedPaymentMethod that contains the id of the stored payment method to be removed in the field StoredPaymentMethod.id.
Asynchronous handling: since this method runs on the main thread, you should make sure the DELETE /storedPaymentMethods call and any other long running operation is made on a background thread.
Use sendRecurringResult to send the final result of this call back to the Drop-in.
Note that not overriding this method while enabling this feature will cause a MethodNotImplementedException to be thrown.
See https://docs.adyen.com/api-explorer/ for more information on the API documentation.
-
-
-
-