OPPCardControllerDelegate

@protocol OPPCardControllerDelegate <NSObject>

A protocol for CardDetails ViewModel delegate.

  • A method intended to run right after custom View Controller viewDidLoad method.

    Declaration

    Objective-C

    - (void)viewControllerDidLoaded;

    Swift

    func viewControllerDidLoaded()
  • A method for canceling current checkout session.

    Declaration

    Objective-C

    - (void)cancelCheckout;

    Swift

    func cancelCheckout()
  • A method for submitting payment transaction.

    Declaration

    Objective-C

    - (void)submitPaymentTransactionWithCompletionHandler:
        (nullable void (^)(BOOL))completionHandler;

    Swift

    func submitPaymentTransaction() async -> Bool

    Parameters

    completionHandler

    for handling payment parameters preparation status.

  • A method for checking if card scanning capability is enabled.

    Declaration

    Objective-C

    - (BOOL)isCardScanAvailable;

    Swift

    func isCardScanAvailable() -> Bool

    Return Value

    BOOL status.

  • A method to start card scanning View Controller.

    Declaration

    Objective-C

    - (void)startCardScan;

    Swift

    func startCardScan()
  • A method to get current payment brand.

    Declaration

    Objective-C

    - (nonnull NSString *)paymentBrand;

    Swift

    func paymentBrand() -> String

    Return Value

    an NSString object.

  • A method to get checkout settings. @returns an OPPCheckoutSettings object.

    Declaration

    Objective-C

    - (nonnull OPPCheckoutSettings *)checkoutSettings;

    Swift

    func checkoutSettings() -> OPPCheckoutSettings
  • A method to get a token. @returns an OPPToken object, or nil if token is empty.

    Declaration

    Objective-C

    - (nullable OPPToken *)token;

    Swift

    func token() -> OPPToken?
  • A method to set number of installments.

    Declaration

    Objective-C

    - (void)updateNumberOfInstallments:(NSUInteger)numberOfInstallments;

    Swift

    func updateNumber(ofInstallments numberOfInstallments: UInt)

    Parameters

    numberOfInstallments

    set number of installments.

  • A method to set billing address.

    Declaration

    Objective-C

    - (void)updateBillingAddress:(nullable OPPBillingAddress *)billingAddress;

    Swift

    func update(_ billingAddress: OPPBillingAddress?)

    Parameters

    billingAddress

    set payment billing address.

  • A method to change current payment brand.

    Declaration

    Objective-C

    - (void)changePaymentBrand:(nonnull NSString *)paymentBrand;

    Swift

    func changePaymentBrand(_ paymentBrand: String)

    Parameters

    paymentBrand

    set payment brand.

  • A method to enable storing payment details.

    Declaration

    Objective-C

    - (void)storePaymentDetails:(BOOL)store;

    Swift

    func storePaymentDetails(_ store: Bool)

    Parameters

    store

    set YES to store payment details.