STPCardFormView
public class STPCardFormView : STPFormView
STPCardFormView
provides a multiline interface for users to input their
credit card details as well as billing postal code and provides an interface to access
the created STPPaymentMethodParams
.
STPCardFormView
includes both the input fields as well as an error label that
is displayed when invalid input is detected.
-
The delegate to notify when the card form transitions to or from being complete.
Seealso
STPCardFormViewDelegateDeclaration
Swift
@objc public weak var delegate: STPCardFormViewDelegate?
-
The background color that is automatically applied to the input fields when
isUserInteractionEnabled
is set tofalse. @note
STPCardFormView` uses text colors, most of which are iOS system colors, that are designed to be as accessible as possible, so any customization should avoid decreasing contrast between the text and background.Declaration
Swift
@objc public var disabledBackgroundColor: UIColor? { get set }
-
A configured
STPPaymentMethodParams
with the entered card number, expiration date, cvc, and postal code (if applicable). If any field is invalid or incomplete then this property will returnnil
. You can monitor whenSTPCardFormView
has complete details by implementingSTPFormViewDelegate
and setting theSTPCardFormView's
delegate
property.Declaration
Swift
@objc public internal(set) var cardParams: STPPaymentMethodParams? { get set }
-
Declaration
Swift
@objc public override var isUserInteractionEnabled: Bool { get set }
-
Public initializer for
STPCardFormView
. @param style The visual style to use for this instance. @see STPCardFormViewStyleDeclaration
Swift
@objc public convenience init(style: STPCardFormViewStyle = .standard)
-
A SwiftUI representation of STPCardFormView
See moreDeclaration
Swift
public struct Representable : UIViewRepresentable