Closed waiting-for-dev closed 1 year ago
Merging #233 (9ddb160) into master (939601a) will increase coverage by
0.85%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #233 +/- ##
==========================================
+ Coverage 95.51% 96.37% +0.85%
==========================================
Files 23 23
Lines 424 441 +17
==========================================
+ Hits 405 425 +20
+ Misses 19 16 -3
Impacted Files | Coverage Δ | |
---|---|---|
app/models/solidus_stripe/gateway.rb | 96.29% <100.00%> (+7.40%) |
:arrow_up: |
lib/solidus_stripe/testing_support/factories.rb | 100.00% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Rebasing on top of master after merging https://github.com/solidusio/solidus_stripe/pull/235 to fix CI
Summary
On Solidus,
Gateway#purchase
is meant to authorize and capture a payment in a single step. However, we were using that method only to authorize (confirm, on Stripe) the payment.We're now moving the authorize logic to a helper method shared by the
#authorize
and#purchase
methods, while we use theautomatic
capture method on#purchase
.We're also unifying the format for the success messages recorded in the response.
We're getting rid of the option to pass custom payment intent options on
#authorize
. That was the only method in the gateway supporting them, and we can add it later to all the methods if we feel that's needed.Closes #232
We take the occasion to perform some house-keeping (two last commits):
Gateway#capture
arguments. However, they also make sense for the other methods in the class. We're also adding unit tests for those checks.Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: