Implement support for deferred PaymenIntent confirmation#249
Conversation
62fe534 to
ed6c05a
Compare
waiting-for-dev
left a comment
There was a problem hiding this comment.
So much simpler!
48c9078 to
f956b85
Compare
6401306 to
61400f8
Compare
Codecov Report
@@ Coverage Diff @@
## master #249 +/- ##
==========================================
- Coverage 99.79% 99.77% -0.03%
==========================================
Files 25 24 -1
Lines 487 442 -45
==========================================
- Hits 486 441 -45
Misses 1 1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
f8a1929 to
e7339e6
Compare
29f4ead to
a51c98c
Compare
a51c98c to
15d972e
Compare
15d972e to
10ac57d
Compare
fcdad41 to
3e9b132
Compare
8c14d2d to
45e6d94
Compare
45e6d94 to
1e1a6aa
Compare
1e1a6aa to
64caa28
Compare
64caa28 to
265aa6e
Compare
kennyadsl
left a comment
There was a problem hiding this comment.
Maybe spotted a method that we are not using, other than that, 👍
Co-Authored-By: Rainer Dema <rainer.dema@gmail.com>
Co-Authored-By: Rainer Dema <rainer.dema@gmail.com>
265aa6e to
0723ed7
Compare
waiting-for-dev
left a comment
There was a problem hiding this comment.
Thanks, @elia & @rainerdema! ❤️ Left one concern about the removal of the gateway methods.
I'm also wondering if we need the SolidusStripe::PaymentIntent model at all. It's not needed from the webhook handlers, as the response_code is filled on payment intent creation. Can you help me understand? Is it only needed in the case a user refreshes the confirm page?
Co-Authored-By: Rainer Dema <rainer.dema@gmail.com>
Since we're memoizing and the nature of the intent is pretty dynamic (e.g. it can change its status) we want to reset it whenever the record is reloaded.
…ment sources After a successful payment confirmation through a payment intent with `setup_future_usage` set to 'on_session' or 'off_session', the payment source (Stripe payment method) can be considered valid for future reuse. For more details, refer to the Stripe documentation: https://stripe.com/docs/api/payment_intents/update#update_payment_intent-setup_future_usage This commit reintroduces the functionality of adding the payment source to the user's wallet after a successful payment, so that the user can reuse it for future transactions without having to enter payment information again.
This commit removes the `authorize` and `purchase` methods as they are now handled client-side. Co-Authored-By: Elia Schito <elia@schito.me>
It now doesn't handle intents anymore.
This was fixed by #213.
0723ed7 to
1cab1dc
Compare
@waiting-for-dev sorry, I merged before replying to this question. And yes, it's there to ensure we have a single payment intent for each order. As you pointed out there might be indirect ways to do the same through |
Summary
Fixes #209, Fixes #185, Fixes #190
This PR improves the payment process by replacing the double flow of
Payment Intent/Setup Intentwith aPayment Intentflow in a specific scenario described in the Stripe documentation:Build a two-step confirmation experience
With the new approach, the two-step subdivision achieves the following issues:
The benefits of this update include:
authorizeandpurchasemethods from the gateway, as they are no longer needed.Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: