smpcb.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. /* Copyright (C) 2020 Andreu Bisquerra Gaya <jove@bisquerra.com>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. /**
  18. * \file htdocs/takepos/smpcb.php
  19. * \ingroup takepos
  20. * \brief Page with the content for smpcb payment
  21. */
  22. if (!defined('NOCSRFCHECK')) {
  23. define('NOCSRFCHECK', '1');
  24. }
  25. if (!defined('NOTOKENRENEWAL')) {
  26. define('NOTOKENRENEWAL', '1');
  27. }
  28. if (!defined('NOREQUIREMENU')) {
  29. define('NOREQUIREMENU', '1');
  30. }
  31. if (!defined('NOREQUIREHTML')) {
  32. define('NOREQUIREHTML', '1');
  33. }
  34. if (!defined('NOREQUIREAJAX')) {
  35. define('NOREQUIREAJAX', '1');
  36. }
  37. require '../main.inc.php';
  38. if (empty($user->rights->takepos->run)) {
  39. accessforbidden();
  40. }
  41. if (GETPOSTISSET('status')) {
  42. die(strtoupper($_SESSION['SMP_CURRENT_PAYMENT']));
  43. }
  44. /*
  45. * View
  46. */
  47. top_httphead('text/html', 1);
  48. if (GETPOST('smp-status')) {
  49. print '<html lang="en">';
  50. print '<head>';
  51. print '<meta charset="utf-8">
  52. <title>The HTML5 Herald</title>
  53. <meta name="description" content="The HTML5 Herald">
  54. <meta name="author" content="SitePoint">
  55. <link rel="stylesheet" href="css/styles.css?v=1.0">';
  56. print '</head>';
  57. print '<body>';
  58. $_SESSION['SMP_CURRENT_PAYMENT'] = GETPOST('smp-status');
  59. print '<script type="application/javascript">
  60. window.onload = function() {
  61. window.close();
  62. };
  63. </script>';
  64. print "Transaction status registered, you can close this";
  65. print '</body></html>';
  66. exit();
  67. }
  68. print 'NOOP';