ActionComponentDelegate

public protocol ActionComponentDelegate : AnyObject

Describes the methods a delegate of the action component needs to implement.

  • Invoked when the action component opens a third party application outside the scope of the Adyen checkout, e.g WeChat Pay Application. In which case you can for example stop any loading animations.

    Declaration

    Swift

    func didOpenExternalApplication(_ component: ActionComponent)

    Parameters

    component

    The component that handled the action.

  • Invoked when the action component finishes. and provides the delegate with the data that was retrieved.

    Declaration

    Swift

    func didProvide(_ data: ActionComponentData, from component: ActionComponent)

    Parameters

    data

    The data supplied by the action component.

    component

    The component that handled the action.

  • Invoked when the action component finishes, without any further steps needed by the application, for example in case of voucher payment methods. The application just needs to dismiss the presented component.

    Declaration

    Swift

    func didComplete(from component: ActionComponent)

    Parameters

    component

    The component that handled the action.

  • Invoked when the action component fails.

    Declaration

    Swift

    func didFail(with error: Error, from component: ActionComponent)

    Parameters

    error

    The error that occurred.

    component

    The component that failed.