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

Deferred intent - Display a detailed error message to customers on card declines #2927

Conversation

james-allan
Copy link
Contributor

Fixes #2920

Changes proposed in this Pull Request:

This pull request makes sure we display a more detailed and specific error message when a card declines.

Before After
Screenshot 2024-02-21 at 10 21 05 am Screenshot 2024-02-21 at 10 21 50 am

Testing instructions

  1. Enable UPE checkout.
  2. Add a product to your cart
  3. On checkout use one of the failing payment methods:
    • 4000000000009995 - Insufficient funds decline
    • 4000000000000069 - Expired card decline
    • 4000000000000127 - Incorrect CVC decline
  4. On add/deferred-intent you will see a generic error message not indicative of the error that occurred. See before screenshot above.
  5. On this branch a more specific error will be displayed.

  • Covered with tests (or have a good reason not to test in description ☝️)
  • Added changelog entry in both changelog.txt and readme.txt (or does not apply)
  • Tested on mobile (or does not apply)

Post merge

@james-allan james-allan requested review from a team and wjrosa and removed request for a team February 21, 2024 00:25
Copy link
Contributor

@mattallan mattallan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Classic checkout 👍image
  • Block checkout 👍image

Tested different failing cards

  • 4100000000000019 - high risk (fraud)
  • 4000000000000002 - generic decline
  • 4000000000009995 - insufficient funds
  • 4000000000000069 - card has expired

Nice fix @james-allan !

@james-allan james-allan merged commit 6fded8b into add/deferred-intent Feb 21, 2024
32 checks passed
@james-allan james-allan deleted the issue/2920-display-specific-error-messages-to-customers branch February 21, 2024 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants