GoksaP Posted December 10, 2012 Share Posted December 10, 2012 (edited) Hello! I would like to execute my code while the hook actionPaymentConfirmation has been called. Example: User is changing order state to PaymentAccepted - and now I would like to execute my code from my module. How can I do this? I have this code: // this also works, and is more future-proof public function install() { return parent :: install() && $this->registerHook('actionPaymentConfirmation'); }[/size][/font][/color] public function hookActionPaymentConfirmation($params) { return Db::getInstance()->execute(' UPDATE `'._DB_PREFIX_.'gp_history` SET `history_message`= `TEST23` WHERE `id_gp_history` = 2'); } But it doesn't work Thanks. Edited December 10, 2012 by GoksaP (see edit history) Link to comment Share on other sites More sharing options...
math_php Posted December 11, 2012 Share Posted December 11, 2012 (edited) Hi I am not sure to understand but try this public function hookUpdateOrderStatus($params) if ( !($params['newOrderStatus']->id == Configuration::get('PS_OS_WS_PAYMENT')) && !($params['newOrderStatus']->id == Configuration::get('PS_OS_PAYMENT') ) return ; This is for 'remote payment accepted' and 'payment accepted' order status change. Good luck Edited December 11, 2012 by math_php (see edit history) 1 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