Closed rainerdema closed 1 year ago
@solidusio/core-team thoughts on https://github.com/solidusio/solidus_stripe/pull/310#issue-1725969255?
Merging #310 (c970554) into main (b7dfc00) will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #310 +/- ##
=======================================
Coverage 99.64% 99.64%
=======================================
Files 31 31
Lines 563 564 +1
=======================================
+ Hits 561 562 +1
Misses 2 2
Impacted Files | Coverage Δ | |
---|---|---|
...lates/app/views/checkouts/payment/_stripe.html.erb | 100.00% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
I think, ideally, our business logic should be able to move forward when there's no required money. If that's not possible, then we should tackle it at the view layer, but I wouldn't enforce a minimum amount.
This will be addressed with: Preventing available payment method rendering for orders fully covered by Store Credits #345
Summary
Fixes #307
This temporary fix enables the finalization of orders entirely covered by store credits or adjustments, but it can't be a permanent solution.
The main "issue" relates to Stirpe, which does not allow a 0$ charge because the minimum amount needed to perform the operation isn't met: https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts
Various alternative strategies could be followed:
Spree::PaymentMethod
that can prevent a payment method from appearing among the choices available for an order inavailable_payment_methods
.ℹ️ Touching the
payment_required?
method onSpree::Order
is something I didn't consider as it would prevent the processing of payments and possibly even the applied store credits, but I haven't looked into that so much, so let me know.Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed:
Screenshots