fix delay on return payment cb
This commit is contained in:
parent
adcebf60ef
commit
1f3b825749
20
override/modules/atos/atos.php
Normal file
20
override/modules/atos/atos.php
Normal 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');
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user