don't update customer.email with shipping
This commit is contained in:
parent
a17ea5abbe
commit
78a8497bb4
|
@ -153,7 +153,10 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
* When your user enters a new shipping address, PaymentContext will save it to
|
||||
* the current customer object. When PaymentContext loads, if you haven't
|
||||
* manually set a prefilled value, any shipping information saved on the customer
|
||||
* will be used to prefill the shipping address form.
|
||||
* will be used to prefill the shipping address form. Note that because your
|
||||
* customer's email may not be the same as the email provided with their shipping
|
||||
* info, PaymentContext will not prefill the shipping form's email using your
|
||||
* customer's email.
|
||||
*
|
||||
* You should not rely on the shipping information stored on the Stripe customer
|
||||
* for order fulfillment, as your user may change this information if they make
|
||||
|
|
|
@ -83,9 +83,6 @@
|
|||
shipping.state = shippingDict[@"address"][@"state"];
|
||||
shipping.postalCode = shippingDict[@"address"][@"postal_code"];
|
||||
shipping.country = shippingDict[@"address"][@"country"];
|
||||
// Note: email is currently one level above in the customer API,
|
||||
// but the SDK stores it in customer.shippingAddress
|
||||
shipping.email = dict[@"email"];
|
||||
customer.shippingAddress = shipping;
|
||||
}
|
||||
NSMutableArray *sources = [NSMutableArray array];
|
||||
|
|
|
@ -149,7 +149,6 @@ static NSTimeInterval const DefaultCachedCustomerMaxAge = 60;
|
|||
NSMutableDictionary *params = [NSMutableDictionary new];
|
||||
params[@"shipping"] = [STPAddress shippingInfoForChargeWithAddress:shipping
|
||||
shippingMethod:nil];
|
||||
params[@"email"] = shipping.email;
|
||||
[STPAPIClient updateCustomerWithParameters:[params copy]
|
||||
usingKey:ephemeralKey
|
||||
completion:^(STPCustomer *customer, NSError *error) {
|
||||
|
|
Loading…
Reference in New Issue