Hello,
In a custom payment module I am creating, I need to set the order status to pending before the customer is redirected to the external payment website.
I have looked in the documentation, in the examples, in 2 free payment module codes and all over online, but I have not found out exactly how to do this. Only that it is possible and has been apparently done by some payed modules.
At a later date, the order will be approved and set to the default status. Might be a few minutes, might a few days.
The only thing left is to look at the source code to try to figure it out myself, however if someone already knows, please let me know?