joseoyarzun Posted October 27, 2013 Share Posted October 27, 2013 (edited) Hello! I'm making a module and am using hookActionOrderStatusUpdate and hookActionPaymentConfirmation actions. I have an external system that receives payment information, processes, saves and returns false if the submission fails or if the action fails for another reason.I need the module interrupts the action of "Payment accepted" if the external system fails. I used return false, but action "Payment accepted" runs anyway.How to program the module to interrupt the action or to change $ params information? Thanks!! public function hookActionOrderStatusUpdate($params){ global $smary, $cookie; if(!ExternSystem::ProccessInformation($params)){ $params['newOrderStatus'] = new OrderState(8, Context::getContext()->cookie->id_lang); return false; } else{ return true; } } Edited October 27, 2013 by joseoyarzun (see edit history) Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted October 29, 2013 Share Posted October 29, 2013 In front office, you should use validation controller for your payment module to validate the payment. To validate order, you should use validateOrder() function actionOrderStatusUpdate is a Back Office Hook, called when an order's status is changed, right before it is actually changed. actionPaymentConfirmation also a Back Office Hook, called when an order's status becomes "Payment accepted". Link to comment Share on other sites More sharing options...
bellini13 Posted October 29, 2013 Share Posted October 29, 2013 are you making a payment module? One that would be used to collect payment from the customer during checkout? 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