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
OPPaymentMethodProtocol
instance with the provided parametersDeclaration
Swift
@objc(createPaymentMethodWithPaymentMethodParams:completion:) public func createPaymentMethod(with params: OPPaymentMethodParamsProtocol, completion: @escaping OPPaymentMethodCompletionBlock)
Parameters
params
The
OPPaymentMethodParamsProtocol
supplied either by anOPPaymentCardDetailsView
orOPPaymentCardDetailsForm
.completion
The callback to run with the returned
OPPaymentMethodProtocol
instance, or an error. -
Creates an
OPCvvUpdateTokenProtocol
instance with the provided parametersDeclaration
Swift
@objc(createCvvUpdateTokenWithTokenParams:completion:) public func createCvvUpdateToken(with params: OPCvvTokenParamsProtocol, completion: @escaping OPCvvTokenUpdateCompletionBlock)
Parameters
params
The
OPCvvTokenParamsProtocol
supplied by anOPPaymentCardCvvView
.completion
The callback to run with the returned
OPCvvUpdateTokenProtocol
instance, or an error -
The environment the SDK is configured for
Declaration
Swift
public internal(set) static var environment: OPEnvironment { get set }