solidusio / solidus_starter_frontend

🎨 Rails-based starter kit for your Solidus storefront.
BSD 3-Clause "New" or "Revised" License
58 stars 40 forks source link

Handle checkout process for orders fully covered by store credits #348

Closed rainerdema closed 1 year ago

rainerdema commented 1 year ago

Summary

Fixes #345

This PR adds logic to handle the checkout process for orders that are fully covered by store credits. In the checkout process, we skip the payment selection stage if the order can be entirely covered by store credits. A message is displayed to the user indicating that no additional payment method is required.

These changes ensure a smoother checkout experience for users who have sufficient store credits to cover their entire order.

https://github.com/solidusio/solidus_stripe/assets/19948291/1bfaa5fd-6b99-4fe8-89b6-aae97cf5885c

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

codecov[bot] commented 1 year ago

Codecov Report

Merging #348 (ecdc45f) into main (dc028e7) will increase coverage by 0.13%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #348      +/-   ##
==========================================
+ Coverage   97.12%   97.26%   +0.13%     
==========================================
  Files         190      190              
  Lines        4491     4498       +7     
==========================================
+ Hits         4362     4375      +13     
+ Misses        129      123       -6     
Impacted Files Coverage Ξ”
templates/app/controllers/checkouts_controller.rb 96.93% <100.00%> (+0.06%) :arrow_up:
...s/app/views/checkouts/steps/_payment_step.html.erb 100.00% <100.00%> (ΓΈ)
templates/spec/system/checkout_spec.rb 100.00% <100.00%> (ΓΈ)

... and 4 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

elia commented 1 year ago

@rainerdema I asked for moving the translation to here, but also wanted to point out that it's great to see this fixed πŸ™Œ