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

Fix: prevent Stripe Payment Element from rendering when amount is zero #7515

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

jonwaldstein
Copy link
Contributor

@jonwaldstein jonwaldstein commented Aug 23, 2024

Resolves GIVE-509

Description

This prevents the Stripe Payment Element from rendering when the donation amount is zero by adding a conditional before loading the fields.

Affects

Stripe payment element gateways

Visuals

Before:

Screenshot 2024-08-23 at 9 29 07 AM

After

Screenshot 2024-08-23 at 10 10 35 AM

Testing Instructions

  • create a v3 form
  • specify 0 for the amount
  • click on stripe payment element

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

Copy link

github-actions bot commented Oct 8, 2024

This PR is stale because it has been open 45 days with no activity. Stale PRs will NOT be automatically closed.

@github-actions github-actions bot added the Stale label Oct 8, 2024
@jonwaldstein
Copy link
Contributor Author

Closing for now:

I started working on this for Stripe but quickly realized the nuances become a weird experience. When 0 is entered we can display a message within the gateway but you can still technically submit the form and receive an error. Furthermore, Stripe uses the amount value, while events are not included in this value.

@jonwaldstein jonwaldstein marked this pull request as ready for review October 30, 2024 21:47
@github-actions github-actions bot removed the Stale label Oct 31, 2024
Copy link
Member

@rickalday rickalday left a comment

Choose a reason for hiding this comment

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

Passed manual QA tests.

@jonwaldstein jonwaldstein changed the base branch from develop to release/3.17.2 November 5, 2024 17:04
@jonwaldstein jonwaldstein merged commit 3f46b6f into release/3.17.2 Nov 5, 2024
20 checks passed
@jonwaldstein jonwaldstein deleted the fix/GIVE-509 branch November 5, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants