- Issue created by @gilmord
- Assigned to TomTech
- Status changed to Postponed: needs info
4 months ago 2:37am 29 July 2024 - ๐บ๐ธUnited States TomTech
Hi @gilmord,
Thanks for the report.
Can you provide the webhook event type for the events that are being skipped with this message? (I can theorize of one scenario where cancelled payment intents might cause this. This might occur if an authenticated customer switched between multiple payment methods...I'd need to test this scenario out. If this is the case, this would be something you can ignore.)
Are you seeing some successful events, or are you seeing all SKIPPED?
Is the Stripe account used exclusively by Drupal Commerce, or are payments created in other applications/systems? (If another application is creating stripe payment intents on the same account, some possible solutions would be to either have separate accounts, or add some custom code to filter out event from the other system.)
- ๐บ๐ฆUkraine gilmord ๐บ๐ฆUkraine
Can you provide the webhook event type for the events that are being skipped with this message?
- payment_intent.succeeded
- payment_intent.payment_failed
- charge.refunded
Are you seeing some successful events, or are you seeing all SKIPPED?
I see only one in "Success" status, which looks like we can ignore it, all the other are SKIPPED
Is the Stripe account used exclusively by Drupal Commerce, or are payments created in other applications/systems?
Only Drupal is used for this Stripe account
This issue looks really strange to me, I am going to debug the process of "payment - webhook - corn" to see where and why it is skipped, I will get back with more details after that.
This is strange it happens to me only, or maybe no one else checks the webhook logs, as for the users all looks ok - payment accepted, order is paid, and in the Stripe dashboard all looks good also.
- ๐จ๐ณChina kongkx
In the default multi-step checkout flow, the offsite payment record is handled in "Payment Process" step. commerce_payment record should be created in the "forms" defined in the related OffsitePaymentGateway.
However, in this module, "Stripe Payment Element" payment info is handled in "Stripe Review" checkout pane. The related record should be created once with the `payment_intent` id and order info, before user interaction, so the webhook processor can handle related payment properly.
In my opinion,
1. the form
Drupal\commerce_stripe\PluginForm\OffsiteRedirect\PaymentOffsiteForm
should be rewritten to display the "Stripe Payment Element".
2. "Stripe Review" checkout pane is not required when using "Stripe Payment Element" gateway.
3. The "stored" payment_method may handled asyncly in webhook processor, but not in `StripePaymentElement::onReturn` as not all payment type in stripe support this feature.