Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple Pay 'street' field with two lines not being split #531

Closed
YoQuieroDistraerlo opened this issue Aug 24, 2021 · 1 comment · Fixed by #548
Closed

Apple Pay 'street' field with two lines not being split #531

YoQuieroDistraerlo opened this issue Aug 24, 2021 · 1 comment · Fixed by #548
Labels
question Further information is requested

Comments

@YoQuieroDistraerlo
Copy link

YoQuieroDistraerlo commented Aug 24, 2021

When Apple Pay provides the street field along with city, state, etc., both in billing address and in shipping address and, the address has two lines (e.g., number and street and, suite number, etc.), street is given by Apple Pay as 'line1'\n'line2'. It must be split manually by the developer.
This is not being done in stripe-react-native, instead, all the content of 'street' is loaded in 'line1' field.

Steps to reproduce the behavior:

  1. Call presentApplePay requiring 'postalAddress' for billing or shipping address.
  2. In Apple Pay sheet select an address (billing or shipping) with two street lines in it.
  3. Check out billingDetails/address/line1 in the payment method returned and both lines will be in line1.
  4. Check out billingDetails/address/line2 in the payment method returned and it will be empty.
  5. Continue to complete the payment and the same will happen with the shipping address node in the payment intent.

Expected behavior
When a contact's address has two lines, the 'street' field provided by Apple Pay must be split (using '\n' as the separator) and the resulting components must be loaded in the corresponding fields (line1 and line2).

Smartphone (please complete the following information):

  • Device: iPhone 11 simulator
  • OS: iOS. 14.5
  • Version: 0.2.0

NOTE: Street is not provided by Apple Pay until the purchase is completed, only the rest of the address fields are provided through useApplePay (onShippingContactSelected).

Workaround
Once the payment method is attached to a customer, split the street and update it to save the changes. Once the payment intent is processed successfully, update its address as well.

@thorsten-stripe thorsten-stripe added the question Further information is requested label Aug 24, 2021
@arekkubaczkowski
Copy link
Collaborator

@YoQuieroDistraerlo thanks for flagging, it's already fixed here #548

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants