Most of the Prestashop payment modules I have come across or any viable tutorial seem to follow the trend of creating and "validating" the order after payment has been ascertained i.e. after the return from a remote payment gateway like PayPal.
We have an architecture that requires we create a traditional "pending" order before payment is even attempted, and then this order's status (history) is changed to "payment accepted" and validated after the payment is completed or otherwise.
Is there a less than complicated way of doing something like this with prestashop?
I have tried calling "validateOrder" with a "pending" order status, and I noticed that would fire an order confirmation mail, and empty the contents of the cart irrespective of the payment status.