-
Notifications
You must be signed in to change notification settings - Fork 149
feat(order2): payment step error handling #16612
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
Conversation
| const handlePaymentElementError = useCallback( | ||
| // do not setStepErrorMessage since the error is being handled by the PaymentElement | ||
| (error: StripeError) => { | ||
| paymentElementRef.current?.scrollIntoView({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 scrolling to the entire payment element UI should be sufficient!
src/Apps/Order2/Routes/Checkout/Components/PaymentStep/Order2PaymentForm.tsx
Outdated
Show resolved
Hide resolved
| if (submitError) { | ||
| logger.error(submitError) | ||
| handleError(submitError) | ||
| handlePaymentElementError(submitError) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think elements.submit() raises validation errors, but I'm not 100% sure if Stripe would always highlight a particular input. I wonder if there would be a case where we do still want to show the error message in our UI. Non-blocking if we can't easily verify.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me try to verify in the docs. I'll merge this as is for now.
starsirius
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have a question about errors from elements.submit(); otherwise LGTM!
#6023 Bundle Size — 9.53MiB (+2.01%).09bae0a(current) vs 4af6329 main#6021(baseline) Warning Bundle contains 34 duplicate packages – View duplicate packages Warning Bundle introduced 2 new packages: @swc/helpers, regenerator-runtime – View changed packages Bundle metrics
Bundle size by type
Bundle analysis report Branch rquartararo/payment-errors Project dashboard Generated by RelativeCI Documentation Report issue |
The type of this PR is: Feat/Refactor
This PR solves EMI-3019
Description
Screen.Recording.2026-01-14.at.3.44.40.PM.mov