OPPaymentCardDetailsForm
@objc
public class OPPaymentCardDetailsForm : UIView, STPCardFormViewDelegate
Convenience multi-field form for collecting card details from a user
Important
Card details are intentionally restricted for PCI compliance-
Public initializer for
OPPaymentCardDetailsFormDeclaration
Swift
@objc public init(style: OPCardFormStyle = .standard)Parameters
styleThe visual style to use for this instance
-
The delegate to notify when the card form transitions to or from being valid.
Declaration
Swift
@objc public var cardDetailsDelegate: OPPaymentCardDetailsFormDelegate? -
The background color for the form
Declaration
Swift
public override var backgroundColor: UIColor? { get set } -
The background color that is automatically applied to the input fields when
isUserInteractionEnabledis set tofalseDeclaration
Swift
@objc public var disabledBackgroundColor: UIColor? { get set } -
Whether or not the form is in a valid state. Use
OPPaymentCardDetailsFormDelegateto know when this state changesDeclaration
Swift
@objc public var isValid: Bool { get } -
Causes the number field to begin editing and presents the keyboard
Important
This is functionally the same as callingbecomeFirstResponder(at: .number)Declaration
Swift
public override func becomeFirstResponder() -> Bool -
Causes the specific text field to begin editing and presents the keyboard
Declaration
Swift
@discardableResult @objc public func becomeFirstResponder(at field: OPCardField) -> BoolParameters
fieldDetermins which card field to be set as first responder
-
Returns the
OPPaymentMethodParamsProtocolinstance representing the details in the form, if it exists, otherwisenil.Declaration
Swift
@objc public func getPaymentMethodParams() -> OPPaymentMethodParamsProtocol?