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(modal-checkout): handle paypal #1985

Merged
merged 5 commits into from
Dec 6, 2024
Merged

Conversation

chickenn00dle
Copy link
Contributor

@chickenn00dle chickenn00dle commented Dec 3, 2024

All Submissions:

Changes proposed in this Pull Request:

Closes https://app.asana.com/0/1207817176293825/1208897296735259/f

We have a handful of publishers using modal checkout with paypal however RAS-ACC breaks this experience. This PR ensures paypal can render and be used in modal checkout.

Screenshot 2024-12-04 at 15 47 36

How to test the changes in this Pull Request:

  1. Install and set up paypal payments (See https://woocommerce.com/document/woocommerce-paypal-payments/#testing-in-sandbox for steps to get set up and note you will need to enable a few settings before paypal buttons become enabled for subscription products.)
  2. Make sure PayPal is set up as one of our payment gateways
  3. On release, go through checkout via any donate or checkout button and confirm you can checkout with paypal
  4. On this branch, repeat the last step again confirming you can checkout with paypal
  5. Repeat these steps for the various paypal buttons

Note: Some of the paypal checkout flows are funky on release already. This PR does not fix this funkiness, but instead just makes sure there is feature parity with paypal working generally.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@chickenn00dle chickenn00dle force-pushed the fix/paypal-in-checkout-modal branch from f0ffea7 to 77d57eb Compare December 4, 2024 17:34
@chickenn00dle chickenn00dle force-pushed the fix/paypal-in-checkout-modal branch from 06042b0 to f395e74 Compare December 4, 2024 20:48
@chickenn00dle chickenn00dle marked this pull request as ready for review December 4, 2024 20:48
@chickenn00dle chickenn00dle requested a review from a team as a code owner December 4, 2024 20:48
Copy link
Contributor

@laurelfulford laurelfulford left a comment

Choose a reason for hiding this comment

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

The Paypal button works well in isolation in my testing; I've noted some visual issues but I think we can handle them separately.

The other buttons I managed to get to appear were:

Google Pay -- this successfully let me run a test transaction, and showed me the success message.

Apple Pay -- this briefly showed a payment processing message and then closed, never changing the appearance of the modal checkout. As discussed, the same issue exists on release so I think we're OK there.

Debit/Credit card payment fields: there are a number of display issues with this option and it doesn't seem to have a test mode, so I can't run a transaction with it. I think we can handle those separately though, since that isn't really the primary use case for Paypal:

CleanShot 2024-12-05 at 12 17 21

CleanShot 2024-12-05 at 12 17 46

Venmo Payment: I was only able to get this button when I switched my store to be US-based. On transaction, I got a "Venmo Sandbox - Venmo is working! Tap the button below and sign in with PayPal Sandbox Account" message, which basically let me pay through Paypal. I don't get the point, but it worked! 😆

I wasn't able to get the black "Debit or Credit Card" appearing at the bottom of the modal checkout at all like in your screenshot. For this is might be worth having an American test, but this otherwise worked for me!

I'm leaving this as a comment instead of an approval in hopes someone US based can test that last Debit/Credit card option.

Of the visual feedback, I think the space above the PayPal button would be nice to fix, but the rest can be handled separately.

src/modal-checkout/checkout.scss Outdated Show resolved Hide resolved
@chickenn00dle chickenn00dle requested a review from dkoo December 5, 2024 20:40
@chickenn00dle
Copy link
Contributor Author

@dkoo I hope it's okay, but I'm assigning you for review to get a US based engineers eyes on this per @laurelfulford's last comment.

chickenn00dle and others added 2 commits December 5, 2024 16:35
Co-authored-by: Laurel <laurel.fulford@automattic.com>
@laurelfulford
Copy link
Contributor

@chickenn00dle The spacing looks better around the Paypal button -- thanks @chickenn00dle! 🎉

Nothing's outstanding for me!

Copy link
Contributor

@dkoo dkoo left a comment

Choose a reason for hiding this comment

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

Tests well with both PayPal and Venmo!

@chickenn00dle chickenn00dle merged commit 9bb2b8c into trunk Dec 6, 2024
9 checks passed
@chickenn00dle chickenn00dle deleted the fix/paypal-in-checkout-modal branch December 6, 2024 21:45
Copy link

github-actions bot commented Dec 6, 2024

Hey @chickenn00dle, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

matticbot pushed a commit that referenced this pull request Dec 6, 2024
# [4.5.0-alpha.3](v4.5.0-alpha.2...v4.5.0-alpha.3) (2024-12-06)

### Bug Fixes

* **modal-checkout:** allow all gateway assets ([#1988](#1988)) ([e371e30](e371e30))
* **modal-checkout:** handle paypal ([#1985](#1985)) ([9bb2b8c](9bb2b8c))

### Features

* add CSS class to variation buttons for tracking ([#1989](#1989)) ([910e6b1](910e6b1))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 4.5.0-alpha.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Dec 9, 2024
# [4.5.0](v4.4.0...v4.5.0) (2024-12-09)

### Bug Fixes

* also search for coauthor posts by term slug ([#1954](#1954)) ([49357ff](49357ff))
* **modal-checkout:** allow all gateway assets ([#1988](#1988)) ([e371e30](e371e30))
* **modal-checkout:** handle paypal ([#1985](#1985)) ([9bb2b8c](9bb2b8c))
* **ras-acc:** correct spacing issue around saved credit cards ([#1980](#1980)) ([52a5c57](52a5c57))
* **ras-acc:** fix display issues with Additional Fields ([#1979](#1979)) ([b9390ef](b9390ef))
* **ras-acc:** remove space caused by empty divs ([#1978](#1978)) ([8cb6ead](8cb6ead))
* remove reCaptcha for WooCommere code from modal checkout ([#1984](#1984)) ([8e250eb](8e250eb))

### Features

* add Bluesky support to the Author Profile, List blocks ([#1969](#1969)) ([d26a7e4](d26a7e4))
* add CSS class to variation buttons for tracking ([#1989](#1989)) ([910e6b1](910e6b1))
* add support for Newspack Guest Contributor in HPP blocks ([#1934](#1934)) ([c16849e](c16849e))
* merge RAS-ACC work into trunk ([#1977](#1977)) ([2eeaa89](2eeaa89))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 4.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

5 participants