Orders marked "Complete" do not trigger "Checkout complete" actions

Created on 5 December 2012, almost 12 years ago
Updated 25 January 2024, 10 months ago

When no more 3D secure payments need to be completed, commerce_3d_secure_commerce_checkout_router updates the order status to the next step and redirects the customer to that step.

      commerce_order_status_update($order, 'checkout_' . $next_step);
      drupal_goto('checkout/' . $order->order_number . '/' . $next_step);

If the next step after 3D secure is "complete", this means that the order is marked as complete and the customer is redirected to the "checkout complete" page, but the "Customer has completed checkout" event is never triggered.

To cater for this eventuality, the following code needs to be added, the "commerce_checkout_complete()" function should be added as follows:

      commerce_order_status_update($order, 'checkout_' . $next_step);
      if ($next_step == 'complete') {
        commerce_checkout_complete($order);
      }
      drupal_goto('checkout/' . $order->order_number . '/' . $next_step);

Find attached a patch to this effect, rolled against the most recent 1.x-dev release. (Patch was hand-edited after creation, my development software was a bit enthusiastic about correcting formatting, like tabs to spaces etc.)

🐛 Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom kingandy

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.

Production build 0.71.5 2024