OPSetupParameters

@objc
public class OPSetupParameters : NSObject

Optional parameters for setting up the Olo Pay API

  • If true, this will be treated as a fresh setup of the API and cached values will be overwritten. This is especially useful for testing purposes when switching between Dev and Production environments

    Note

    This should generall be set to false for production builds

    Declaration

    Swift

    public let freshSetup: Bool
  • If using ApplePay, this is the merchant Id registered with Apple

    Important

    This is required when using ApplePay

    Declaration

    Swift

    public let applePayMerchantId: String?
  • If using ApplePay, this is the company label that will be displayed on the ApplePay payment sheet

    Important

    This is required when using ApplePay

    Declaration

    Swift

    public let applePayCompanyLabel: String?
  • Declaration

    Swift

    public let environment: OPEnvironment
  • Creates an instance of OPSetupParameters to be used with OloPayApiInitializer.setup(...)

    Declaration

    Swift

    public init(withEnvironment environment: OPEnvironment? = OPEnvironment.production, withFreshSetup freshSetup: Bool? = false, withApplePayMerchantId merchantId: String? = "", withApplePayCompanyLabel companyLabel: String? = "")

    Parameters

    environment

    The environment the SDK will run in. Defaults to OPEnvironment.production

    freshSetup

    Ignore any cached setup values and treat this as a fresh setup. Should typically be false for release builds. Defaults to false

    merchantId

    ApplePay merchant Id registered with Apple

    companyLabel

    Company name displayed on the ApplePay sheet