DropInComponentDelegate

public protocol DropInComponentDelegate : AnyObject

Defines the methods a delegate of the drop in component should implement.

  • Invoked when a payment method is selected and the initial details have been filled.

    Declaration

    Swift

    func didSubmit(_ data: PaymentComponentData, from component: DropInComponent)

    Parameters

    data

    The data supplied by the drop in component, containing the selected payment method and the filled details.

    component

    The drop in component in which the payment method was selected and filled.

  • Invoked when additional details have been provided for a payment method.

    Declaration

    Swift

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

    Parameters

    data

    The additional data supplied by the drop in component.

    component

    The drop in component from which the additional details were provided.

  • Invoked when the drop in component failed with an error.

    Declaration

    Swift

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

    Parameters

    error

    The error that occurred.

    component

    The drop in component that failed.