fix delay on return payment cb

This commit is contained in:
Thibault UBUNTU 2016-11-21 12:47:59 +01:00
parent adcebf60ef
commit 1f3b825749

View File

@ -0,0 +1,20 @@
<?php
class AtosOverride extends Atos
{
public function hookOrderConfirmation($params)
{
if ($params['objOrder']->module != $this->name)
return;
// fix delay after payment
sleep(5);
if ($params['objOrder']->valid || $params['objOrder']->current_state == _PS_OS_PAYMENT_)
$this->context->smarty->assign(array('status' => 'ok', 'id_order' => $params['objOrder']->id));
else
$this->context->smarty->assign('status', 'failed');
return $this->display(__FILE__, 'views/templates/hook/hookorderconfirmation.tpl');
}
}