In Drupal Commerce, I need a way to send a user back to their checkout page if the payment gateway responds back with an error.
Right now it kind of bombs out and just tosses a nasty error message to the user and the cart and its contents are "gone", since Drupal marks the Commerce order as complete.
I've tried adding in my custom error handler function something like: commerce_order_status_update($order, 'checkout_review'); or commerce_order_status_update($order, 'cart');
But in both cases, the order does remain however some weird things happen, such as if you try to go to /cart you get a cart empty message as well as the shipping information gets dropped.
I'm beginning to think I'm not following the best practice for returning a user properly to their cart following an error in the checkout process.