ComponentCallback

Implement this callback to interact with a PaymentComponent.

Functions

Link copied to clipboard
abstract fun onAdditionalDetails(actionComponentData: ActionComponentData)

In this method you should make a network call to the /payments/details endpoint of the Checkout API through your server.

Link copied to clipboard
abstract fun onError(componentError: ComponentError)

The component has encountered an error. Use ComponentError.exception to get the internal exception.

Link copied to clipboard
open fun onPermissionRequest(requiredPermission: String, permissionCallback: PermissionHandlerCallback)

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.

Link copied to clipboard
open fun onStateChanged(state: T)

You can implement this optional method to receive an update any time the state of the component changes.

Link copied to clipboard
abstract fun onSubmit(state: T)

In this method you should make a network call to the /payments endpoint of the Checkout API through your server.