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) throws

    Parameters

    transaction

    Transaction object to process, and it should not be nil.

    mode

    Provider 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

    presentingViewController

    Viewcontroller to present affirm transaction processing view.

    completionBlock

    Completion block to handle transaction or error.

  • Method to process affirm transaction.

    Throws

    The error that occurred while processing transaction. See code attribute (OPPErrorCode) and NSLocalizedDescription to identify the reason of failure.

    Declaration

    Swift

    public func process(_ presentingViewController: UIViewController) async throws -> OPPTransaction

    Parameters

    presentingViewController

    Viewcontroller to present affirm transaction processing view.

    Return Value

    The processed transaction.