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
Support auto_capture
for the Stripe payment method
#260
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rainerdema
force-pushed
the
rainer/auto-capture-support
branch
3 times, most recently
from
March 29, 2023 16:30
5d68c75
to
769c05b
Compare
rainerdema
force-pushed
the
elia+rainer/thanks-stripe-beta-team
branch
from
March 29, 2023 16:42
64caa28
to
265aa6e
Compare
rainerdema
force-pushed
the
rainer/auto-capture-support
branch
from
March 29, 2023 16:42
769c05b
to
d465a72
Compare
Codecov Report
@@ Coverage Diff @@
## elia+rainer/thanks-stripe-beta-team #260 +/- ##
====================================================================
Coverage 99.77% 99.77%
====================================================================
Files 24 24
Lines 442 446 +4
====================================================================
+ Hits 441 445 +4
Misses 1 1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
rainerdema
force-pushed
the
rainer/auto-capture-support
branch
from
March 30, 2023 08:52
1a699cb
to
e7fef03
Compare
rainerdema
force-pushed
the
elia+rainer/thanks-stripe-beta-team
branch
from
March 30, 2023 10:44
265aa6e
to
0723ed7
Compare
rainerdema
force-pushed
the
rainer/auto-capture-support
branch
2 times, most recently
from
March 30, 2023 10:55
2e2087e
to
a69f0ef
Compare
elia
force-pushed
the
elia+rainer/thanks-stripe-beta-team
branch
from
March 30, 2023 11:57
0723ed7
to
1cab1dc
Compare
With this commit, the Solidus auto-capture feature has been incorporated into the Stripe integration through the use of the auto_capture flag in the Spree::PaymentMethod base model. Stripe `capture_method` is now auto configured during the intent creation with "manual" or "automatic" based on the auto_capture flag in the related payment method. More information can be found in the Stripe documentation: https://stripe.com/docs/api/payment_intents/object#payment_intent_object-capture_method
- Update payment_element_options hash to include the `captureMethod` parameter - Ensure captureMethod value matches the capture_method provided when creating the Payment Intent Adding `captureMethod` improves security by ensuring that the capture_method value used during payment method creation matches the value provided when creating the Payment Intent. This helps prevent fraudulent activity and errors, such as a scenario where an admin changes the auto-capture mode after the Stripe Payment Method creation, causing the payment to fail. Reference: https://stripe.com/docs/js/elements_object/create_without_intent
rainerdema
force-pushed
the
rainer/auto-capture-support
branch
from
March 30, 2023 13:04
a69f0ef
to
dcafcca
Compare
waiting-for-dev
approved these changes
Mar 30, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!!
elia
approved these changes
Mar 31, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #178
With this PR, the Solidus auto-capture feature has been incorporated into the Stripe integration through the use of the auto_capture flag in the
Spree::PaymentMethod
base model.Stripe
capture_method
is now auto-configured during the intent creation with "manual" or "automatic" based on the auto_capture flag in the related payment method.More information can be found in the Stripe documentation:
https://stripe.com/docs/api/payment_intents/object#payment_intent_object-capture_method
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: