STPBankSelectionViewController
Objective-C
@interface STPBankSelectionViewController : STPCoreTableViewController
Swift
class STPBankSelectionViewController : STPCoreTableViewController
This view controller displays a list of banks of the specified type, allowing the user to select one to pay from. Once a bank is selected, it will return a PaymentMethodParams object, which you can use to confirm a PaymentIntent or inspect to obtain details about the selected bank.
-
A convenience initializer; equivalent to calling
initWithBankMethod:bankMethod configuration:[STPPaymentConfiguration sharedConfiguration] theme:[STPTheme defaultTheme]
.Declaration
Objective-C
- (nonnull instancetype)initWithBankMethod:(STPBankSelectionMethod)bankMethod;
Swift
init(bankMethod: STPBankSelectionMethod)
-
Initializes a new
STPBankSelectionViewController
with the provided configuration and theme. Don’t forget to set thedelegate
property after initialization.Declaration
Objective-C
- (nonnull instancetype) initWithBankMethod:(STPBankSelectionMethod)bankMethod configuration:(nonnull STPPaymentConfiguration *)configuration theme:(nonnull STPTheme *)theme;
Swift
init(bankMethod: STPBankSelectionMethod, configuration: STPPaymentConfiguration, theme: STPTheme)
Parameters
bankMethod
The user will be presented with a list of banks for this payment method. STPBankSelectionMethodFPX is currently the only supported payment method.
configuration
The configuration to use. This determines the Stripe publishable key to use when querying metadata about the banks. - see: STPPaymentConfiguration
theme
The theme to use to inform the view controller’s visual appearance. - see: STPTheme
-
The view controller’s delegate. This must be set before showing the view controller in order for it to work properly. - see: STPBankSelectionViewControllerDelegate
Declaration
Objective-C
@property (nonatomic, weak) id<STPBankSelectionViewControllerDelegate> _Nullable delegate;
Swift
weak var delegate: STPBankSelectionViewControllerDelegate? { get set }
-
The API Client to use to make requests.
Defaults to [STPAPIClient sharedClient]
Declaration
Objective-C
@property (nonatomic, strong) STPAPIClient *_Nonnull apiClient;
Swift
var apiClient: STPAPIClient { get set }