STPPaymentResult
@interface STPPaymentResult : NSObject
When you’re using STPPaymentContext
to request your user’s payment details, this is the object that will be returned to your application when they’ve successfully made a payment. It currently just contains a source
, but in the future will include any relevant metadata as well. You should pass source.stripeID
to your server, and call the charge creation endpoint. This assumes you are charging a Customer, so you should specify the customer
parameter to be that customer’s ID and the source
parameter to the value returned here. For more information, see https://stripe.com/docs/api#create_charge
-
The returned source that the user has selected. This may come from a variety of different payment methods, such as an Apple Pay payment or a stored credit card. - see: STPSource.h
Declaration
Objective-C
@property (nonatomic, readonly) id<STPSourceProtocol> _Nonnull source;
Swift
var source: STPSourceProtocol { get }
-
Initializes the payment result with a given source. This is invoked by
STPPaymentContext
internally; you shouldn’t have to call it directly.Declaration
Objective-C
- (nonnull instancetype)initWithSource:(nonnull id<STPSourceProtocol>)source;
Swift
init(source: STPSourceProtocol)