OPPAffirmProcessor
@interface OPPAffirmProcessor : NSObject
Class to process affirm transaction.
-
Creates an object representing an affirm processor.
Declaration
Objective-C
- (nullable instancetype) initWithTransaction:(nonnull OPPTransaction *)transaction mode:(OPPProviderMode)mode error:(NSError *_Nullable *_Nullable)error;
Swift
init(transaction: OPPTransaction, mode: OPPProviderMode) throws
Parameters
transaction
Transaction object to process, and it should not be nil.
mode
Provider mode to set environment.
error
Error occured while initializing the processor.
Return Value
Returns an object representing an affirm processor.
-
Method to process affirm transaction
Declaration
Objective-C
- (void)process:(nonnull UIViewController *)presentingViewController with:(nonnull CompletionBlock)completionBlock;
Swift
func process(_ presentingViewController: UIViewController) async throws -> OPPTransaction
Parameters
presentingViewController
Viewcontroller to present affirm transaction processing view.
completionBlock
Completion block to handle transaction or error.