SQIPCardEntryViewController

@interface SQIPCardEntryViewController : UIViewController

Lets the application collect card information from the customer. If the card information entered is valid, a card nonce will be provided to the delegate.

  • Creates a new card entry view controller.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithTheme:(nonnull SQIPTheme *)theme;

    Swift

    init(theme: SQIPTheme)

    Parameters

    theme

    The theme instance used to style the card entry view controller.

  • The object that acts as the delegate of the card entry view controller.

    Declaration

    Objective-C

    @property (readwrite, nonatomic, nullable)
        id<SQIPCardEntryViewControllerDelegate>
            delegate;

    Swift

    weak var delegate: SQIPCardEntryViewControllerDelegate? { get set }
  • Indicates that the customer must enter the postal code associated with their payment card. When false, the postal code field will not be displayed.

    Defaults to true.

    Note

    Postal code collection is required for processing payments for Square accounts based in the United States, Canada, and United Kingdom. Disabling postal code collection in those regions will result in all credit card transactions being declined.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL collectPostalCode;

    Swift

    var collectPostalCode: Bool { get set }