solidusio / solidus_stripe

๐Ÿ’ณ Integrate Solidus with Stripe
https://stripe.com
BSD 3-Clause "New" or "Revised" License
36 stars 62 forks source link

Add support for Store Credits #261

Closed rainerdema closed 1 year ago

rainerdema commented 1 year ago

Summary

Fixes #198

This PR adds functionality to support the use of store credits when processing payments through the Stripe payment method. Specifically, the initialization of the Stripe elements and the creation of payment intents have been updated to ensure that the correct amount is charged to the user, considering any available store credits applied to the related order.

Note

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 #261 (a657cad) into master (105220e) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #261   +/-   ##
=======================================
  Coverage   99.79%   99.79%           
=======================================
  Files          26       26           
  Lines         484      484           
=======================================
  Hits          483      483           
  Misses          1        1           
Impacted Files Coverage ฮ”
app/models/solidus_stripe/payment_intent.rb 100.00% <รธ> (รธ)
...lates/app/views/checkouts/payment/_stripe.html.erb 100.00% <รธ> (รธ)

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