Problem/Motivation

The commerce_payment_sync module currently supports payment synchronization for some gateways such as PayPal and Sermepa, but it does not provide support for Stripe Checkout.

This means that if a Stripe Checkout payment is successfully completed in Stripe but the normal callback or webhook flow fails to correctly attach the payment to the Drupal Commerce order, the order can remain pending even though the customer has already paid.

Adding support for Stripe Checkout would make it possible to recover those payments

Proposed resolution

Add a new commerce_payment_sync plugin for Stripe Checkout.

The plugin would:

  • Load the Stripe Checkout Session using a stored checkout_session_id from the order.
  • Retrieve the related payment information from the session, including the PaymentIntent and Invoice when available.
  • Validate that the remote transaction belongs to the Commerce order.
  • Create or update the corresponding commerce_payment entity.
  • Allow pending orders to be synchronized and marked as paid when the payment was successfully completed in Stripe.

Note

This feature requires the Checkout Session ID to be stored on the order.

By default, commerce_stripe_checkout does not persist checkout_session_id in order data, so the payment cannot be recovered later through the Stripe API.

For that reason, this feature depends on the patch from:
https://www.drupal.org/project/commerce_stripe_checkout/issues/3436233

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bryan toapanta created an issue. See original summary.

bryan toapanta’s picture

Issue summary: View changes

omarlopesino’s picture

Status: Needs review » Fixed

It is good for me . There are static analysis errors that will be fixed in future releases, I didn't want to review them know because there is a mix of the new and old errors. It will be ready in 1.0.6

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.