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() -> UITextField
Return Value
an
UITextField
object to the view model. -
A method to get custom View Controller card holder TextField.
Declaration
Objective-C
- (nonnull UITextField *)cardControllerCardHolderTextField;
Swift
func cardControllerCardHolderTextField() -> UITextField
Return Value
an
UITextField
object to the view model. -
A method to get custom View Controller expiration date TextField.
Declaration
Objective-C
- (nonnull UITextField *)cardControllerExpirationDateTextField;
Swift
func cardControllerExpirationDateTextField() -> UITextField
Return Value
an
UITextField
object to the view model. -
A method to get custom View Controller CVV TextField.
Declaration
Objective-C
- (nonnull UITextField *)cardControllerCVVTextField;
Swift
func cardControllerCVVTextField() -> UITextField
Return Value
an
UITextField
object to the view model. -
A method to get custom View Controller country code TextField.
Declaration
Objective-C
- (nonnull UITextField *)cardControllerCountryCodeField;
Swift
optional func cardControllerCountryCodeField() -> UITextField
Return Value
an
UITextField
object to the view model. -
A method to get custom View Controller phone number TextField.
Declaration
Objective-C
- (nonnull UITextField *)cardControllerMobilePhoneField;
Swift
optional func cardControllerMobilePhoneField() -> UITextField
Return Value
an
UITextField
object 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
textField
Validated TextField.
error
error 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
textField
changed TextField.
hidden
indecates 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
paymentBrands
an array of detected payment brands..
error
error object,
nil
payment brands detected successfully.