dolibarr/htdocs/takepos/smpcb.php

84 lines
2.0 KiB
PHP
Raw Permalink Normal View History

2019-11-25 23:15:39 +01:00
<?php
/* Copyright (C) 2020 Andreu Bisquerra Gaya <jove@bisquerra.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* 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. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
2022-09-07 20:21:01 +02:00
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/**
* \file htdocs/takepos/smpcb.php
* \ingroup takepos
* \brief Page with the content for smpcb payment
*/
2021-02-26 21:17:52 +01:00
if (!defined('NOTOKENRENEWAL')) {
define('NOTOKENRENEWAL', '1');
}
if (!defined('NOREQUIREMENU')) {
define('NOREQUIREMENU', '1');
}
if (!defined('NOREQUIREHTML')) {
define('NOREQUIREHTML', '1');
}
if (!defined('NOREQUIREAJAX')) {
define('NOREQUIREAJAX', '1');
}
2022-09-07 20:08:59 +02:00
// Load Dolibarr environment
require '../main.inc.php';
2023-10-15 18:41:39 +02:00
if (!$user->hasRight('takepos', 'run')) {
2020-03-23 15:46:16 +01:00
accessforbidden();
}
2019-11-25 23:15:39 +01:00
if (GETPOSTISSET('status')) {
2019-11-25 23:19:50 +01:00
die(strtoupper($_SESSION['SMP_CURRENT_PAYMENT']));
}
2019-11-25 23:15:39 +01:00
/*
* View
*/
top_httphead('text/html', 1);
if (GETPOST('smp-status')) {
print '<html lang="en">';
print '<head>';
print '<meta charset="utf-8">
2019-11-25 23:15:39 +01:00
<title>The HTML5 Herald</title>
<meta name="description" content="The HTML5 Herald">
<meta name="author" content="SitePoint">
<link rel="stylesheet" href="css/styles.css?v=1.0">';
2019-11-25 23:15:39 +01:00
print '</head>';
2019-11-25 23:15:39 +01:00
print '<body>';
$_SESSION['SMP_CURRENT_PAYMENT'] = GETPOST('smp-status');
2019-11-25 23:15:39 +01:00
2019-11-25 23:19:50 +01:00
print '<script type="application/javascript">
2019-11-25 23:15:39 +01:00
window.onload = function() {
window.close();
2022-12-30 18:43:43 +01:00
}
2019-11-25 23:15:39 +01:00
</script>';
2019-11-25 23:19:50 +01:00
print "Transaction status registered, you can close this";
2019-11-25 23:15:39 +01:00
print '</body></html>';
exit();
2019-11-25 23:19:50 +01:00
}
2019-11-25 23:15:39 +01:00
print 'NOOP';