stripe / react-stripe-js

React components for Stripe.js and Stripe Elements
https://stripe.com/docs/stripe-js/react
MIT License
1.74k stars 266 forks source link

[BUG]: unhandled wallet account email with trailing whitespaces on PaymentRequest for Apple/Google Pay integration #377

Open ivanwidj opened 1 year ago

ivanwidj commented 1 year ago

What happened?

When using PaymentRequest to handle apple/google pay integration, create payment_method (POST v1/payment_methods) might fail if the email address from the wallet account is invalid (e.g. having trailing whitespaces test@mail.com).

Though these kind of emails seem to have already been caught/handled on newly created wallet accounts, in live/prod scenarios a small percentage of old accounts still have email addresses with trailing whitespaces.

A proposed solution is to trim trailing whitespaces from email address value before using it on billing_details.email when creating payment method within PaymentRequest flow

Environment

No response

Reproduction

No response

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

martinalong-stripe commented 1 year ago

Thanks for flagging this! We've added it to our roadmap to trim whitespaces from emails before returning them

frenchie048 commented 10 months ago

Hi there! Any updates on this @martinalong-stripe?

ivanwidj commented 1 month ago

Any update on this bug @martinalong-stripe? also please let me know if this bug is more appropriate to be raised on https://github.com/stripe/stripe-js instead

brendanm-stripe commented 1 month ago

Hey @ivanwidj -- no update to share here but I would suggest writing in to support as well, describing this problem, sharing a link to this issue and ideally including examples of failed payments/PM creation requests as a result.

Support: https://support.stripe.com/contact

This way we can associate your Stripe account to our internal record of the issue for any follow ups.