telnett Posted June 19, 2017 Share Posted June 19, 2017 Hi guys, I'm having some hard time trying to validate order without adding a transaction. Looks like I'm not getting the whole procedure right and my orders end up with bad payment (0 EUR) when I execute this before sending a customer out to the payment gateway: $this->module->validateOrder((int)$this->context->cart->id, Configuration::get('PS_OS_PREPARATION'), null, "my module", null, array(), null, false, $customer->secure_key); What I'm trying to achieve here is a pending order with no payments received which will then be validated by callback from a payment gateway so could you please shed some light on this. Link to comment Share on other sites More sharing options...
telnett Posted June 19, 2017 Author Share Posted June 19, 2017 Please ignore this post, the solution was to use a different state which I tried but failed at first (because of file write permissions), that made me think that solution was not effective. Here is what worked great for me: $this->module->validateOrder((int)$this->context->cart->id,17,null,"my module",null,[],null,false,$customer->secure_key); 17 - my custom order state which says "waiting for payment". Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now