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 ECE modal not loading on pay for order page when coupon is applied #3609

Merged
merged 3 commits into from
Nov 18, 2024

Conversation

Mayisha
Copy link
Contributor

@Mayisha Mayisha commented Nov 15, 2024

When an order uses a coupon, the express payment modal does not load on the pay for order page. The issue happens because we are not sending the coupon as a line item when loading the modal on the pay for order page. This results in a mismatch in the total.

Changes proposed in this Pull Request:

  • Adding the coupon amount as a line item.

Testing instructions

  • Enable the new checkout experience.
  • Enable the ECE feature flag.
  • Enable the express payment methods on Stripe settings page (Google Pay/Apple Pay and Link).
  • As an admin, go to the order creation page.
  • Add a product to the order and add a coupon.
  • Add a customer and create the order.
  • Open the 'Customer payment page →' link as the customer.
  • Notice that the express checkout buttons are loading fine.
  • Now in develop branch, click on the Link or Google Pay button.
  • Notice that the corresponding modal never loads.
Screenshot 2024-11-15 at 7 12 18 PM
  • In this branch, the modals should load correctly.
  • Confirm that the amounts (subtotal, coupon, total) displayed on the modal are correct.
  • Confirm that the final charged amount is correct.

@Mayisha Mayisha marked this pull request as draft November 15, 2024 13:28
@Mayisha Mayisha marked this pull request as ready for review November 18, 2024 06:14
@Mayisha Mayisha requested review from a team and wjrosa and removed request for a team November 18, 2024 06:15
Copy link
Contributor

@wjrosa wjrosa left a comment

Choose a reason for hiding this comment

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

Thanks for working on this fix, Mayisha! Code is good and it works as intended:
Screenshot 2024-11-18 at 09 45 13
Screenshot 2024-11-18 at 09 45 52

@Mayisha Mayisha merged commit 96319ff into develop Nov 18, 2024
33 of 35 checks passed
@Mayisha Mayisha deleted the fix/pay-for-order-with-coupon branch November 18, 2024 14:53
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.

2 participants