DropInComponent

public final class DropInComponent : NSObject, PresentableComponent
extension DropInComponent: PresentationDelegate
extension DropInComponent: FinalizableComponent

A component that handles the entire flow of payment selection and payment details entry.

  • The payment methods to display.

    Declaration

    Swift

    public let paymentMethods: PaymentMethods
  • The delegate of the drop in component.

    Declaration

    Swift

    public weak var delegate: DropInComponentDelegate?
  • Indicates the UI configuration of the drop in component.

    Declaration

    Swift

    public let style: Style
  • The title text on the first page of drop in component.

    Declaration

    Swift

    public let title: String
  • Initializes the drop in component.

    Declaration

    Swift

    public init(paymentMethods: PaymentMethods,
                paymentMethodsConfiguration: PaymentMethodsConfiguration,
                style: Style = Style(),
                title: String? = nil)

    Parameters

    paymentMethods

    The payment methods to display.

    paymentMethodsConfiguration

    The payment method specific configuration.

    style

    The UI styles of the components.

    title

    Name of the application. To be displayed on a firstpayment page. If no external value provided, the Main Bundle’s name would be used.

Handling Actions

  • Handles an action to complete a payment.

    Declaration

    Swift

    public func handle(_ action: Action)

    Parameters

    action

    The action to handle.

  • Declaration

    Swift

    public func present(component: PresentableComponent)
  • Stops loading and finalise DropIn’s selected payment if nececery. This method must be called after certan payment methods (e.x. ApplePay)

    Declaration

    Swift

    public func didFinalize(with success: Bool)

    Parameters

    success

    Status of the payment.

  • Indicates the UI configuration of the drop in components.

    See more

    Declaration

    Swift

    struct Style
  • Contains the configuration for the drop in component and the embedded payment method components.

    See more

    Declaration

    Swift

    final class PaymentMethodsConfiguration
  • Card component related configuration.

    See more

    Declaration

    Swift

    final class CardConfiguration
  • Apple Pay component configuration.

    See more

    Declaration

    Swift

    final class ApplePayConfiguration