OloPayAPI
@objc
public class OloPayAPI : NSObject, OloPayAPIProtocol
Represents 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
OPPaymentMethodProtocolinstance with the provided parametersDeclaration
Swift
@objc(createPaymentMethodWithPaymentMethodParams:completion:) public func createPaymentMethod(with params: OPPaymentMethodParamsProtocol, completion: @escaping OPPaymentMethodCompletionBlock)Parameters
paramsThe
OPPaymentMethodParamsProtocolsupplied either by anOPPaymentCardDetailsVieworOPPaymentCardDetailsForm.completionThe callback to run with the returned
OPPaymentMethodProtocolinstance, or an error. -
Creates an
OPCvvUpdateTokenProtocolinstance with the provided parametersDeclaration
Swift
@objc(createCvvUpdateTokenWithTokenParams:completion:) public func createCvvUpdateToken(with params: OPCvvTokenParamsProtocol, completion: @escaping OPCvvTokenUpdateCompletionBlock)Parameters
paramsThe
OPCvvTokenParamsProtocolsupplied by anOPPaymentCardCvvView.completionThe callback to run with the returned
OPCvvUpdateTokenProtocolinstance, or an error -
The environment the SDK is configured for
Declaration
Swift
public internal(set) static var environment: OPEnvironment { get set }