1 | <?php |
||
2 | /* |
||
3 | You may not change or alter any portion of this comment or credits |
||
4 | of supporting developers from this source code or any supporting source code |
||
5 | which is considered copyrighted (c) material of the original comment or credit authors. |
||
6 | |||
7 | This program is distributed in the hope that it will be useful, |
||
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||
10 | */ |
||
11 | |||
12 | /** |
||
13 | * oledrion |
||
14 | * |
||
15 | * @copyright {@link https://xoops.org/ XOOPS Project} |
||
16 | * @license {@link http://www.fsf.org/copyleft/gpl.html GNU public license} |
||
17 | * @author Hervé Thouzard (http://www.herve-thouzard.com/) |
||
18 | */ |
||
19 | |||
20 | use XoopsModules\Oledrion; |
||
21 | |||
22 | /** |
||
23 | * Page appelée par la passerelle de paiement dans le cas de l'annulation d'une commande |
||
24 | */ |
||
25 | require_once __DIR__ . '/header.php'; |
||
26 | $GLOBALS['current_category'] = -1; |
||
27 | $GLOBALS['xoopsOption']['template_main'] = 'oledrion_cancelpurchase.tpl'; |
||
28 | require_once XOOPS_ROOT_PATH . '/header.php'; |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
29 | |||
30 | // On donne la possibilité à la passerelle d'annuler la commande |
||
31 | $gateway = null; |
||
32 | $gateway = \XoopsModules\Oledrion\Gateways::getGatewayObject(); |
||
33 | if (is_object($gateway) && method_exists($gateway, 'cancelOrder')) { |
||
34 | if (!file_exists(OLEDRION_GATEWAY_LOG_PATH)) { |
||
35 | file_put_contents(OLEDRION_GATEWAY_LOG_PATH, '<?php exit(); ?>', LOCK_EX); |
||
36 | } |
||
37 | $gateway->cancelOrder(OLEDRION_GATEWAY_LOG_PATH); |
||
38 | unset($gateway); |
||
39 | } elseif (\Xmf\Request::hasVar('id', 'GET')) { |
||
0 ignored issues
–
show
The type
Xmf\Request was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
40 | $order = null; |
||
41 | $order = $commandsHandler->getOrderFromCancelPassword($_GET['id']); |
||
42 | if (is_object($order)) { |
||
43 | $commandsHandler->setOrderCanceled($order); |
||
44 | } |
||
45 | } |
||
46 | $caddyHandler->emptyCart(); |
||
47 | $xoopsTpl->assign('mod_pref', $mod_pref); |
||
48 | $xoopsTpl->assign('breadcrumb', Oledrion\Utility::breadcrumb([OLEDRION_URL . basename(__FILE__) => _OLEDRION_ORDER_CANCELED])); |
||
49 | |||
50 | $title = _OLEDRION_ORDER_CANCELED . ' - ' . Oledrion\Utility::getModuleName(); |
||
51 | Oledrion\Utility::setMetas($title, $title); |
||
52 | Oledrion\Utility::setCSS(); |
||
53 | Oledrion\Utility::setLocalCSS($xoopsConfig['language']); |
||
54 | require_once XOOPS_ROOT_PATH . '/footer.php'; |
||
55 |