STPPaymentOption
@protocol STPPaymentOption <NSObject>
This protocol represents a payment method that a user can select and use to pay.
The classes that conform to it and are supported by the UI:
STPApplePay
, which represents that the user wants to pay with Apple PaySTPPaymentMethod
. OnlySTPPaymentMethod.type == STPPaymentMethodTypeCard
is supported bySTPPaymentContext
andSTPPaymentOptionsViewController
Note
card-based Sources and Cards support for this protocol for use in a custom integration.
-
A small (32 x 20 points) logo image representing the payment method. For example, the Visa logo for a Visa card, or the Apple Pay logo.
Declaration
Objective-C
@property (readonly, strong, nonatomic) UIImage *_Nonnull image;
Swift
var image: UIImage { get }
-
A small (32 x 20 points) logo image representing the payment method that can be used as template for tinted icons.
Declaration
Objective-C
@property (readonly, strong, nonatomic) UIImage *_Nonnull templateImage;
Swift
var templateImage: UIImage { get }
-
A string describing the payment method, such as “Apple Pay” or “Visa 4242”.
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSString *_Nonnull label;
Swift
var label: String { get }
-
Describes whether this payment option may be used multiple times. If it is not reusable, the payment method must be discarded after use.
Declaration
Objective-C
@property (readonly, getter=isReusable, nonatomic) BOOL reusable;
Swift
var isReusable: Bool { get }