OPPCardDetailsDataSource
@protocol OPPCardDetailsDataSource <NSObject>
A protocol collects card details and additional information required for card payment.
-
CardDetails ViewController delegate.
Declaration
Objective-C
@property (nonatomic, nullable) id<OPPCardControllerDelegate> cardControllerDelegate;Swift
var cardControllerDelegate: (any OPPCardControllerDelegate)? { get set } -
A method to get custom View Controller card number TextField.
Declaration
Objective-C
- (nonnull UITextField *)cardControllerCardNumberTextField;Swift
func cardControllerCardNumberTextField() -> UITextFieldReturn Value
an
UITextFieldobject to the view model. -
A method to get custom View Controller card holder TextField.
Declaration
Objective-C
- (nonnull UITextField *)cardControllerCardHolderTextField;Swift
func cardControllerCardHolderTextField() -> UITextFieldReturn Value
an
UITextFieldobject to the view model. -
A method to get custom View Controller expiration date TextField.
Declaration
Objective-C
- (nonnull UITextField *)cardControllerExpirationDateTextField;Swift
func cardControllerExpirationDateTextField() -> UITextFieldReturn Value
an
UITextFieldobject to the view model. -
A method to get custom View Controller CVV TextField.
Declaration
Objective-C
- (nonnull UITextField *)cardControllerCVVTextField;Swift
func cardControllerCVVTextField() -> UITextFieldReturn Value
an
UITextFieldobject to the view model. -
A method to get custom View Controller country code TextField.
Declaration
Objective-C
- (nonnull UITextField *)cardControllerCountryCodeField;Swift
optional func cardControllerCountryCodeField() -> UITextFieldReturn Value
an
UITextFieldobject to the view model. -
A method to get custom View Controller phone number TextField.
Declaration
Objective-C
- (nonnull UITextField *)cardControllerMobilePhoneField;Swift
optional func cardControllerMobilePhoneField() -> UITextFieldReturn Value
an
UITextFieldobject to the view model. -
A method to listen for TextViews validation errors.
Declaration
Objective-C
- (void)cardControllerTextField:(nonnull UITextField *)textField errorDidHappen:(nullable NSError *)error;Swift
optional func cardControllerTextField(_ textField: UITextField, errorDidHappen error: (any Error)?)Parameters
textFieldValidated TextField.
errorerror object.
-
A method to listen for TextViews visibility changes.
Declaration
Objective-C
- (void)cardControllerTextField:(nonnull UITextField *)textField shouldChangeVisibility:(BOOL)hidden;Swift
optional func cardControllerTextField(_ textField: UITextField, shouldChangeVisibility hidden: Bool)Parameters
textFieldchanged TextField.
hiddenindecates if TextField is changed visibility.
-
A method to listen for detected payment brands..
Declaration
Objective-C
- (void)cardControllerOnPaymentBrandsDetected: (nullable NSArray<NSString *> *)paymentBrands error:(nullable NSError *)error;Swift
optional func cardController(onPaymentBrandsDetected paymentBrands: [String]?, error: (any Error)?)Parameters
paymentBrandsan array of detected payment brands..
errorerror object,
nilpayment brands detected successfully.
OPPCardDetailsDataSource Protocol Reference