diff --git a/Stripe/PublicHeaders/STPPaymentContext.h b/Stripe/PublicHeaders/STPPaymentContext.h index 5eedb3c7b7..6ab48b704b 100644 --- a/Stripe/PublicHeaders/STPPaymentContext.h +++ b/Stripe/PublicHeaders/STPPaymentContext.h @@ -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 diff --git a/Stripe/STPCustomer.m b/Stripe/STPCustomer.m index 4a5edb6089..88f7f23912 100644 --- a/Stripe/STPCustomer.m +++ b/Stripe/STPCustomer.m @@ -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]; diff --git a/Stripe/STPCustomerContext.m b/Stripe/STPCustomerContext.m index e567854893..177df8b706 100644 --- a/Stripe/STPCustomerContext.m +++ b/Stripe/STPCustomerContext.m @@ -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) {