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;

    Parameters

    theme

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

  • Creates a new card entry view controller.

    Declaration

    Objective-C

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

    Parameters

    theme

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

    isGiftCard

    Set to true to enter a Square gift card. Other card types are not supported in this mode.

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

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<SQIPCardEntryViewControllerDelegate> delegate;
  • 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 payments being declined.

    Declaration

    Objective-C

    @property (nonatomic) BOOL collectPostalCode;