UserInterface

final class UserInterface : Sendable

UI.

  • Creates and returns a UIViewController that handles adding card to wallet. Must be used as a modal.

    Declaration

    Swift

    @MainActor
    public func createAddCardToWalletViewController(
        token: String,
        accountUuid: String,
        cardUuid: String,
        cardholderName: String,
        lastFourDigits: String,
        paymentNetwork: PKPaymentNetwork,
        onCompletion: @escaping @Sendable (Result<Void, ALEventError>) -> Void
    ) -> UIViewController?

    Parameters

    token

    The token to authenticate the SDK.

    extraData

    Extra data to be sent along card data.

    validation

    A custom fields validation to apply to the view. If nil is passed the default validations are applied.

    style

    The style customizations object. If nil is passed the default style is applied.

    onCompletion

    Completion handler.

    Return Value

    A UIViewController instance.

  • Create and returns a View. that handles adding card to wallet. Must be used as a modal.

    Declaration

    Swift

    @MainActor
    public func createAddCardToWalletView<Fallback: View>(
        token: String,
        accountUuid: String,
        cardUuid: String,
        cardholderName: String,
        lastFourDigits: String,
        paymentNetwork: PKPaymentNetwork,
        onCompletion: @escaping @Sendable (Result<Void, ALEventError>) -> Void,
        @ViewBuilder fallback: @escaping () -> Fallback
    ) -> some View

    Parameters

    token

    The token to authenticate the SDK.

    extraData

    Extra data to be sent along card data.

    validation

    A custom fields validation to apply to the view. If nil is passed the default validations are applied.

    style

    The style customizations object. If nil is passed the default style is applied.

    onCompletion

    Completion handler.

    fallback

    Fallback view.

    Return Value

    A View instance.