Include requires action intent status to prevent intent cancellation

Created on 11 September 2025, about 1 month ago

Problem/Motivation

When using the Stripe as a base payment gateway for Mobilepay, the current OrderPaymentIntentSubscriber::onOrderPreSave() cancels payment intents too aggressively.

Specifically, if the original payment method is empty, the code checks the intent status and only prevents cancellation for these statuses:

  • succeeded
  • processing
  • requires_capture (PaymentIntent only)

However, a PaymentIntent with status requires_confirmation is not included, and as a result, such intents are incorrectly added to the cancel list and removed from the order ($order->unsetData('stripe_intent')).

This causes valid payment intents that are waiting for client-side confirmation to be cancelled prematurely, breaking the checkout flow.

Proposed resolution

Update the status checks in OrderPaymentIntentSubscriber::onOrderPreSave() to also treat requires_confirmation as a valid intent status that should not be cancelled.

This would align with the expected Stripe workflow where an intent can remain in requires_confirmation until it’s confirmed client-side.
Update the status checks in OrderPaymentIntentSubscriber::onOrderPreSave() to also treat requires_confirmation as a valid intent status that should not be cancelled.

This would align with the expected Stripe workflow where an intent can remain in requires_confirmation until it’s confirmed client-side.

πŸ› Bug report
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡―πŸ‡΄Jordan Abdelrahman khlefat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024