BTDropInResult
Objective-C
@interface BTDropInResult : NSObject
typedef void (^BTDropInResultFetchHandler)(BTDropInResult * _Nullable result, NSError * _Nullable error);
/// True if the modal was dismissed without selecting a payment method
@property (nonatomic, assign, getter=isCancelled) BOOL cancelled;
/// The type of the payment option
@property (nonatomic, assign) BTUIKPaymentOptionType paymentOptionType;
/// A UIView (BTUIKPaymentOptionCardView) that represents the payment option
@property (nonatomic, readonly) UIView *paymentIcon;
/// A description of the payment option (e.g `ending in 1234`)
@property (nonatomic, readonly) NSString *paymentDescription;
/// The payment method nonce
@property (nonatomic, strong, nullable) BTPaymentMethodNonce *paymentMethod;
/// Fetch a BTDropInResult without displaying or initializing a BTDropInController. Works with client tokens that
/// were created with a `customer_id`.
///
/// @param authorization Your tokenization key or client token.
/// @param handler The handler for callbacks.
+ (void)fetchDropInResultForAuthorization:(NSString *)authorization handler:(BTDropInResultFetchHandler)handler;
@end
Swift
class BTDropInResult : NSObject
Undocumented
-
True if the modal was dismissed without selecting a payment method
Declaration
Objective-C
@property (nonatomic, getter=isCancelled) BOOL cancelled;
Swift
var isCancelled: Bool { get set }
-
The type of the payment option
Declaration
Objective-C
@property (nonatomic) int paymentOptionType;
Swift
var paymentOptionType: Int32 { get set }
-
A UIView (BTUIKPaymentOptionCardView) that represents the payment option
Declaration
Objective-C
@property (nonatomic, readonly) UIView *_Nonnull paymentIcon;
Swift
var paymentIcon: UIView { get }
-
A description of the payment option (e.g
ending in 1234
)Declaration
Objective-C
@property (nonatomic, readonly) NSString *_Nonnull paymentDescription;
Swift
var paymentDescription: String { get }
-
The payment method nonce
Declaration
Objective-C
@property (nonatomic, strong, nullable) BTPaymentMethodNonce *paymentMethod;
Swift
var paymentMethod: BTPaymentMethodNonce? { get set }
-
Fetch a BTDropInResult without displaying or initializing a BTDropInController. Works with client tokens that were created with a
customer_id
.Declaration
Objective-C
+ (void)fetchDropInResultForAuthorization:(nonnull NSString *)authorization handler:(nonnull BTDropInResultFetchHandler) handler;
Swift
class func fetch(forAuthorization authorization: String, handler: @escaping BTDropInResultFetchHandler)
Parameters
authorization
Your tokenization key or client token.
handler
The handler for callbacks.