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

Displaying errors in apple pay sheet. #148

Closed
gax97 opened this issue Apr 5, 2021 · 1 comment · Fixed by #228
Closed

Displaying errors in apple pay sheet. #148

gax97 opened this issue Apr 5, 2021 · 1 comment · Fixed by #228
Assignees
Labels
enhancement New feature or request P1 Address these issues second

Comments

@gax97
Copy link
Collaborator

gax97 commented Apr 5, 2021

Is your feature request related to a problem? Please describe.
I would like to show errors if payment parameters are not valid in the apple pay sheet.

Describe the solution you'd like
Would be good to display a general error message and disallow the pay button if the shipping address isn't valid for example, or if possible show validation for particular shipping address fields, like zipcode or state.

Additional context
When "onShippingContact" event is triggered you usually need to run some logic where you calculate taxes or shipping method prices. There can be a situation where the user inputs an invalid shipping address and I don't see a way to point out that error to the user in the apple pay sheet.

@thorsten-stripe thorsten-stripe self-assigned this Apr 6, 2021
@thorsten-stripe
Copy link
Contributor

Thanks for flagging this. It is currently not supported and we also don't provide a way to dismiss the payment sheet, so currently can't really handle that case.

We should probably do two things

  1. Allow to programmatically dismiss the payment sheet
  2. Allow to provide an error in the handler for onShippingMethodSelected and onShippingContactSelected to be shown in the payment sheet.

Relevant docs

https://developer.apple.com/documentation/passkit/pkpaymentrequest
https://developer.apple.com/documentation/passkit/pkpaymenterror

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P1 Address these issues second
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants