thecrow_julian Posted November 3, 2015 Share Posted November 3, 2015 Hi, since weeks im having a great problem with my ogone module. When you pay the product via ogone page, when it redirects to the prestashop after the waiting i get this message We noticed a problem with your order. If you think this is an error, you can contact our customer support. Im using prestashop 1.6.0.9 and the last version of the ogone module. I tried to print some values in hookorderconfirmation.tpl like this: <p class="warning"> {l s='We noticed a problem with your order. If you think this is an error, you can contact our' mod='ogone'} <a href="{$ogone_link|escape:'htmlall':'UTF-8'}">{l s='customer support' mod='ogone'}</a>. {$status} {$invoice}{$valid} </p> Obviously adding this lines in ogone.php: public function hookOrderConfirmation($params) { if ($params['objOrder']->module != $this->name) return; $this->context->smarty->assign(array('invoice' => $params['objOrder']->invoice_number)); $this->context->smarty->assign(array('valid' => $params['objOrder']->valid)); if ($params['objOrder']->valid || (Configuration::get('OGONE_OPERATION') == self::OPERATION_AUTHORISE && (int)$params['objOrder']->current_state === (int)Configuration::get('OGONE_PAYMENT_AUTHORIZED') )) $this->context->smarty->assign(array('status' => 'ok', 'id_order' => $params['objOrder']->id)); else $this->context->smarty->assign('status', 'failed'); $this->context->smarty->assign('operation', Configuration::get('OGONE_OPERATION') ? Configuration::get('OGONE_OPERATION') : self::OPERATION_SALE); $link = method_exists('Link', 'getPageLink') ? $this->context->link->getPageLink('contact', true) : Tools::getHttpHost(true).'contact'; $this->context->smarty->assign('ogone_link', $link); return $this->display(__FILE__, 'views/templates/hook/hookorderconfirmation.tpl'); } The problem is that status is "failed", valid "0" (false) and invoice is "0". That values reach the hookorderconfirmation.tpl, but when i enter mysql the values are ok (valid:1, invoice: 213). I read all the post and got no solution. Also tried validating current_state but the same, values dont reach that point with the mysql data. The logic is ok but i cant understand why that values are different from the database, all accepted pays send mail to the customer and the parameters in the db are ok, but the validation to display that message is wrong. Thanks a lot! 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