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: Hide donation form submit button to prevent errors with PayPal Commerce payment flow #7576

Merged
merged 3 commits into from
Oct 21, 2024

Conversation

pauloiankoski
Copy link
Contributor

@pauloiankoski pauloiankoski commented Oct 18, 2024

Resolves GIVE-1097

Description

This PR addresses an issue where donors click the donation form’s submit button instead of PayPal’s “Pay Now” button when filling out credit card fields through PayPal Commerce. This causes an error, as PayPal cannot complete the transaction properly through the form’s submit button.

The solution hides the form’s submit button when PayPal Commerce is selected, ensuring donors interact only with PayPal’s button. The submit button is restored when switching to other gateways and PayPal Commerce fields component unmounts.

Affects

Visual Builder Forms

Visuals

CleanShot 2024-10-18 at 20 37 06

Testing Instructions

  1. Navigate to the donation form page.
  2. Select “Donate with Credit Card” (PayPal Commerce) as the payment gateway.
  3. Verify that the form’s submit button is hidden, ensuring only PayPal’s “Pay Now” button is available for interaction.
  4. Change to a different payment gateway and verify that the submit button is visible again.
  5. Repeat the process and ensure that switching between gateways consistently shows or hides the correct buttons.

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
Contributor

@JoshuaHungDinh JoshuaHungDinh left a comment

Choose a reason for hiding this comment

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

Looks good!

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 master October 21, 2024 19:46
@jonwaldstein jonwaldstein merged commit 56d72dc into master Oct 21, 2024
20 checks passed
@jonwaldstein jonwaldstein deleted the fix/hide-submit-paypal branch October 21, 2024 19:46
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.

4 participants