STPUserInformation
@interface STPUserInformation : NSObject <NSCopying>
You can use this class to specify information that you’ve already collected
from your user. You can then set the prefilledInformation
property on
STPPaymentContext
, STPAddCardViewController
, etc and it will pre-fill
this information whenever possible.
-
The user’s billing address. When set, the add card form will be filled with this address. The user will also have the option to fill their shipping address using this address.
Note
Set this usingsetBillingAddressWithBillingDetails:
to use the billing details from anSTPPaymentMethod
orSTPPaymentMethodParams
instance.Declaration
Objective-C
@property (readwrite, strong, nonatomic, nullable) STPAddress *billingAddress;
Swift
var billingAddress: STPAddress? { get set }
-
The user’s shipping address. When set, the shipping address form will be filled with this address. The user will also have the option to fill their billing address using this address.
Declaration
Objective-C
@property (readwrite, strong, nonatomic, nullable) STPAddress *shippingAddress;
Swift
var shippingAddress: STPAddress? { get set }
-
A convenience method to populate
billingAddress
with a PaymentMethod’s billing details.Note
Calling this overwrites the value ofbillingAddress
.Declaration
Objective-C
- (void)setBillingAddressWithBillingDetails: (nonnull STPPaymentMethodBillingDetails *)billingDetails;
Swift
func setBillingAddress(with billingDetails: STPPaymentMethodBillingDetails)