From 1f3b82574957b616b6c971c21fccbb46b31ea1f6 Mon Sep 17 00:00:00 2001 From: Thibault UBUNTU Date: Mon, 21 Nov 2016 12:47:59 +0100 Subject: [PATCH] fix delay on return payment cb --- override/modules/atos/atos.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 override/modules/atos/atos.php diff --git a/override/modules/atos/atos.php b/override/modules/atos/atos.php new file mode 100644 index 00000000..1540fbf1 --- /dev/null +++ b/override/modules/atos/atos.php @@ -0,0 +1,20 @@ +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'); + } + +}