- Issue created by @dww
- Merge request !2[#3445272] fix: Support both Stripe and StripePaymentElement gateways β (Open) created by dww
- Status changed to Needs review
6 months ago 10:24pm 4 May 2024 - πΊπΈUnited States dww
In very mild local testing, the change in the MR seems to work. This is the first time I'm looking closely at payment gateways at all, much less the gory details of Stripe. Would love some reviews / pointers on if this is legit. π
- πΊπΈUnited States zengenuity
The code looks fine at first glance. However, when does a PaymentIntentEvent fire? Do we need to check the status of the event to make sure we're only recording the fee when the payment has actually succeeded? In the Commerce Stripe code, I see that the TransactionDataEvent is only dispatched when the status of the PaymentIntent is REQUIRES_CAPTURE and SUCCEEDED, and when
count($intent->charges->data) !== 0
.https://git.drupalcode.org/project/commerce_stripe/-/blob/8.x-1.x/src/Pl...
Do we need a similar check to make sure we're not importing the fee when the charge was declined?