-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy paththankyou.php
52 lines (44 loc) · 1.91 KB
/
thankyou.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/*
You may not change or alter any portion of this comment or credits
of supporting developers from this source code or any supporting source code
which is considered copyrighted (c) material of the original comment or credit authors.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/
/**
* oledrion
*
* @copyright {@link https://xoops.org/ XOOPS Project}
* @license {@link http://www.fsf.org/copyleft/gpl.html GNU public license}
* @author Hervé Thouzard (http://www.herve-thouzard.com/)
*/
/**
* Page appelée par la passerelle après le paiement en ligne
*/
use XoopsModules\Oledrion;
require_once __DIR__ . '/header.php';
$GLOBALS['current_category'] = -1;
$success = true;
$GLOBALS['xoopsOption']['template_main'] = 'oledrion_thankyou.tpl';
require_once XOOPS_ROOT_PATH . '/header.php';
$caddyHandler->emptyCart();
// On donne la possibilité à la passerelle de traiter la commande
$gateway = null;
$gateway = \XoopsModules\Oledrion\Gateways::getGatewayObject();
if (is_object($gateway) && method_exists($gateway, 'thankYou')) {
if (!file_exists(OLEDRION_GATEWAY_LOG_PATH)) {
file_put_contents(OLEDRION_GATEWAY_LOG_PATH, '<?php exit(); ?>', LOCK_EX);
}
$gateway->thankYou(OLEDRION_GATEWAY_LOG_PATH);
unset($gateway);
}
$xoopsTpl->assign('success', $success);
$xoopsTpl->assign('global_advert', Oledrion\Utility::getModuleOption('advertisement'));
$xoopsTpl->assign('breadcrumb', Oledrion\Utility::breadcrumb([OLEDRION_URL . basename(__FILE__) => _OLEDRION_PURCHASE_FINSISHED]));
$title = _OLEDRION_PURCHASE_FINSISHED . ' - ' . Oledrion\Utility::getModuleName();
Oledrion\Utility::setMetas($title, $title);
Oledrion\Utility::setCSS();
Oledrion\Utility::setLocalCSS($xoopsConfig['language']);
require_once XOOPS_ROOT_PATH . '/footer.php';