OloPayAPI
@objc
public class OloPayAPI : NSObject, OloPayAPIProtocolRepresents the OloPayAPI and functionality related to it
Important
Prior to calling methods in this class be sure to initialize the SDK by callingOloPayApiInitializer.setup
- 
                  
                  Creates an OPPaymentMethodinstance with the provided control.Warning This method was deprecated in v1.0.2. Please usecreatePaymentMethod(with: OPPaymentMethodParams, completion: OPPaymentMethodCompletionBlock)DeclarationSwift @available(swift, deprecated: 1.0, message: "Deprecated in Olo Pay SDK v1.0.2: Use createPaymentMethod(with: OPPaymentMethodParams, completion: OPPaymentMethodCompletionBlock﹚ instead.") @objc(createPaymentMethodWithPaymentForm:completion:) public func createPaymentMethod(with paymentForm: OPPaymentCardDetailsForm, completion: @escaping OPPaymentMethodCompletionBlock)ParameterspaymentFormThe OPPaymentCardDetailsFormfrom the UI.completionThe callback to run with the returned OPPaymentMethodinstance, or an error
- 
                  
                  Creates an OPPaymentMethodinstance with the provided control.Warning This method was deprecated in v1.0.2. Please usecreatePaymentMethod(with: OPPaymentMethodParams, completion: OPPaymentMethodCompletionBlock)DeclarationSwift @available(swift, deprecated: 1.0, message: "Deprecated in Olo Pay SDK v1.0.2: Use createPaymentMethod(with: OPPaymentMethodParams, completion: OPPaymentMethodCompletionBlock﹚ instead.") @objc(createPaymentMethodWithPaymentControl:completion:) public func createPaymentMethod(with paymentControl: OPPaymentCardDetailsView, completion: @escaping OPPaymentMethodCompletionBlock)ParameterspaymentControlThe OPPaymentCardDetailsViewfrom the UIcompletionThe callback to run with the returned OPPaymentMethodinstance, or an error.
- 
                  
                  Creates an OPPaymentMethodobject with provided parametersDeclarationSwift @available(swift, introduced: 1.0, message: "Introduced in Olo Pay SDK v1.0.2") @objc(createPaymentMethodWithPaymentMethodParams:completion:) public func createPaymentMethod(with params: OPPaymentMethodParamsProtocol, completion: @escaping OPPaymentMethodCompletionBlock)ParameterspaymentParametersThe OPPaymentMethodParamssupplied either by anOPPaymentCardDetailsVieworOPPaymentCardDetailsForm.completionThe callback to run with the returned OPPaymentMethodinstance, or an error.
- 
                  
                  Whether or not this device can make Apple Pay payments via a supported card network Supported ApplePay card networks are: American Express, Visa, Mastercard, Discover DeclarationSwift public func deviceSupportsApplePay() -> BoolReturn ValueYES if the device is currently able to make Apple Pay payments via one of the supported networks. NO if the user does not have a saved card of a supported type, or other restrictions prevent payment (such as parental controls). 
- 
                  
                  A convenience method to build a PKPaymentRequestwith sane default values.Important OloPayApiInitializer.setup(...)must have been called with both the Apple Pay merchant id and company name prior to calling this methodDeclarationSwift public func createPaymentRequest(forAmount amount: NSDecimalNumber, inCountry country: String = "US", withCurrency currency: String = "USD") throws -> PKPaymentRequestParametersforAmountThe amount to charge inCountryThe two-letter code for the payment country (Defaults to “US”) withCurrencyThe three-letter code for the currency (Defaults to “USD”). ApplePay interprets the amounts provided by the summary items attached to this request as amounts in this currency. Return Valuea PKPaymentRequestwith proper default values
- 
                  
                  DeclarationSwift public static var sdkWrapperInfo: OPSdkWrapperInfo?
 OloPayAPI Class Reference
        OloPayAPI Class Reference