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

    STPCardFormViewDelegate

    Declaration

    Swift

    @objc
    public weak var delegate: STPCardFormViewDelegate?
  • The background color that is automatically applied to the input fields when isUserInteractionEnabled is set to false. @noteSTPCardFormView` 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 return nil. You can monitor when STPCardFormView has complete details by implementing STPFormViewDelegate and setting the STPCardFormView'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 STPCardFormViewStyle

    Declaration

    Swift

    @objc
    public convenience init(style: STPCardFormViewStyle = .standard)
  • A SwiftUI representation of STPCardFormView

    See more

    Declaration

    Swift

    public struct Representable : UIViewRepresentable