Interface ActionComponentCallback
-
- All Implemented Interfaces:
public interface ActionComponentCallbackImplement this callback to interact with an ActionComponent.
-
-
Method Summary
Modifier and Type Method Description abstract UnitonAdditionalDetails(ActionComponentData actionComponentData)In this method you should make a network call to the /payments/details endpoint of the Checkout API through your server. abstract UnitonError(ComponentError componentError)The component has encountered an error. UnitonPermissionRequest(String requiredPermission, PermissionHandlerCallback permissionCallback)Should be overridden to support runtime permissions for components. -
-
Method Detail
-
onAdditionalDetails
abstract Unit onAdditionalDetails(ActionComponentData actionComponentData)
In this method you should make a network call to the /payments/details endpoint of the Checkout API through your server.
We provide inside ActionComponentData the whole request data expected by the /payments/details endpoint. Use ActionComponentData.SERIALIZER to serialize this data to a JSONObject.
You can dismiss the component after this API call is successful, there is no need to perform any extra actions.
See https://docs.adyen.com/api-explorer/ for more information on the API documentation.
- Parameters:
actionComponentData- The data from the action component.
-
onError
abstract Unit onError(ComponentError componentError)
The component has encountered an error. Use ComponentError.exception to get the internal exception.
- Parameters:
componentError- The error encountered.
-
onPermissionRequest
Unit onPermissionRequest(String requiredPermission, PermissionHandlerCallback permissionCallback)
Should be overridden to support runtime permissions for components. Runtime permission should be requested and communicated back through the callback. If not overridden, PermissionHandlerCallback.onPermissionRequestNotHandled will be invoked, which will show an error message.
- Parameters:
requiredPermission- Required runtime permission.permissionCallback- Callback to be used when passing permission result.
-
-
-
-