OPPAffirmProcessor
@objc
public class OPPAffirmProcessor : NSObject
Class to process affirm transaction.
-
Creates an object representing an affirm processor.
Throws
Error occured while initializing the processor.Declaration
Swift
@objc public init(transaction: OPPTransaction, mode: OPPProviderMode) throwsParameters
transactionTransaction object to process, and it should not be nil.
modeProvider mode to set environment.
Return Value
Returns an object representing an affirm processor.
-
Method to process affirm transaction.
Declaration
Swift
@objc public func process(_ presentingViewController: UIViewController, with completionBlock: @escaping CompletionBlock)Parameters
presentingViewControllerViewcontroller to present affirm transaction processing view.
completionBlockCompletion block to handle transaction or error.
-
Method to process affirm transaction.
Throws
The error that occurred while processing transaction. See code attribute (OPPErrorCode) andNSLocalizedDescriptionto identify the reason of failure.Declaration
Swift
public func process(_ presentingViewController: UIViewController) async throws -> OPPTransactionParameters
presentingViewControllerViewcontroller to present affirm transaction processing view.
Return Value
The processed transaction.
OPPAffirmProcessor Class Reference