CardViewController
public class CardViewController: UIViewController,
AddressViewControllerDelegate,
CardNumberInputViewDelegate,
CvvInputViewDelegate,
UITextFieldDelegate
A view controller that allows the user to enter card information.
-
Card View
Declaration
Swift
public let cardView: CardView
-
Undocumented
Declaration
Swift
public let checkoutApiClient: CheckoutAPIClient?
-
Undocumented
Declaration
Swift
public var billingDetailsAddress: CkoAddress?
-
Undocumented
Declaration
Swift
public var billingDetailsPhone: CkoPhoneNumber?
-
Undocumented
Declaration
Swift
public let addressViewController: AddressViewController
-
List of available schemes
Declaration
Swift
public var availableSchemes: [CardScheme]
-
Delegate
Declaration
Swift
public weak var delegate: CardViewControllerDelegate?
-
Right bar button item
Declaration
Swift
public var rightBarButtonItem: UIBarButtonItem
-
Returns a newly initialized view controller with the cardholder’s name and billing details state specified. You can specified the region using the Iso2 region code (
UK
forUnited Kingdom
)Declaration
Swift
public init(checkoutApiClient: CheckoutAPIClient, cardHolderNameState: InputState, billingDetailsState: InputState, defaultRegionCode: String? = nil)
-
Returns a newly initialized view controller with the nib file in the specified bundle.
Declaration
Swift
public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?)
-
Returns an object initialized from data in a given unarchiver.
Declaration
Swift
required public init?(coder aDecoder: NSCoder)
-
Called after the controller's view is loaded into memory.
Declaration
Swift
override public func viewDidLoad()
-
Notifies the view controller that its view is about to be added to a view hierarchy.
Declaration
Swift
public override func viewWillAppear(_ animated: Bool)
-
Notifies the view controller that its view is about to be removed from a view hierarchy.
Declaration
Swift
public override func viewWillDisappear(_ animated: Bool)
-
Called to notify the view controller that its view has just laid out its subviews.
Declaration
Swift
public override func viewDidLayoutSubviews()
-
MARK: Methods
Declaration
Swift
public func setDefault(regionCode: String)
-
Executed when an user tap on the done button.
Declaration
Swift
public func onTapDoneButton(controller: AddressViewController, address: CkoAddress, phone: CkoPhoneNumber)
-
Tells the delegate that editing stopped for the specified text field.
Declaration
Swift
public func textFieldDidEndEditing(_ textField: UITextField)
-
Tells the delegate that editing stopped for the textfield in the specified view.
Declaration
Swift
public func textFieldDidEndEditing(view: UIView)
-
Called when the card number changed.
Declaration
Swift
public func onChangeCardNumber(cardType: CardType?)
-
Declaration
Swift
public func onChangeCvv()