Protocols

The following protocols are available globally.

  • Protocol for mocking/testing purposes. See OloPayAPI for documentation

    See more

    Declaration

    Swift

    @objc
    public protocol OloPayAPIProtocol : NSObjectProtocol
  • Protocol for mocking/testing purposes. See OloPayApiInitializer for documentation

    See more

    Declaration

    Swift

    @objc
    public protocol OloPayApiInitializerProtocol : NSObjectProtocol
  • Protocol to hook into important events in the ApplePay flow

    Required: Implement paymentMethodCreated to get payment method details that need to be submitted to Olo’s Ordering API when submitting a basket with OloPay

    Optional: Implement applePayDismissed to know when the ApplePay sheet is dismissed

    See more

    Declaration

    Swift

    @objc
    public protocol OPApplePayLauncherDelegate : NSObjectProtocol
  • Protocol for mocking/testing purposes. See OPApplePayLauncher for documentation

    See more

    Declaration

    Swift

    @objc
    public protocol OPApplePayLauncherProtocol : NSObjectProtocol
  • Defines the interface that should be implemented to receive updates from instances of OPPaymentCardCvvView. Each callback method is optional so you only need to implement the ones you need.

    Important

    There are two versions of each callback method. One version contains a reference to the view and can be used if you are implementing these callbacks in your UI layer. If implementing callbacks in a data layer it is recommended to implement the versions that do not contain a reference to a view.
    See more

    Declaration

    Swift

    @objc
    public protocol OPPaymentCardCvvViewDelegate : NSObjectProtocol
  • Defines the interface that should be implemented to receive updates from instances of OPPaymentCardDetailsForm. Each callback method is optional so you only need to implement the ones you need.

    Important

    There are two versions of each callback method. One version contains a reference to the view and can be used if you are implementing these callbacks in your UI layer. If implementing callbacks in a data layer it is recommended to implement the versions that do not contain a reference to a view.
    See more

    Declaration

    Swift

    @objc
    public protocol OPPaymentCardDetailsFormDelegate : NSObjectProtocol
  • Defines the interface that should be implemented to receive updates from instances of OPPaymentCardDetailsView. Each callback method is optional so you only need to implement the ones you need.

    Important

    There are two versions of each callback method. One version contains a reference to the view and can be used if you are implementing these callbacks in your UI layer. If implementing callbacks in a data layer it is recommended to implement the versions that do not contain a reference to a view.
    See more

    Declaration

    Swift

    @objc
    public protocol OPPaymentCardDetailsViewDelegate : NSObjectProtocol
  • Represents an address.

    See more

    Declaration

    Swift

    @objc
    public protocol OPAddressProtocol : NSObjectProtocol
  • Protocol representing the state of a credit card field (card number, expiration, cvv, postal code).

    See more

    Declaration

    Swift

    @objc
    public protocol OPCardFieldStateProtocol : NSObjectProtocol
  • Parameters class used to generate a CVV token via OloPayAPI.createCvvToken(...)

    Declaration

    Swift

    @objc
    public protocol OPCvvTokenParamsProtocol : NSObjectProtocol
  • Represents a single-use cvv update token used to submit a basket via Olo’s Ordering API when a saved card requires CVV revalidation

    See more

    Declaration

    Swift

    @objc
    public protocol OPCvvUpdateTokenProtocol : NSObjectProtocol
  • Payment method parameters to send payment data to OloPayAPI.createPaymentMethod(...)

    Declaration

    Swift

    @objc
    public protocol OPPaymentMethodParamsProtocol : NSObjectProtocol
  • Represents a payment method containing all information needed to submit a basket via Olo’s Ordering API

    See more

    Declaration

    Swift

    @objc
    public protocol OPPaymentMethodProtocol : NSObjectProtocol