smpcb.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. if (GETPOST('smp-status')) {
  45. print '<html lang="en">';
  46. print '<head>';
  47. print '<meta charset="utf-8">
  48. <title>The HTML5 Herald</title>
  49. <meta name="description" content="The HTML5 Herald">
  50. <meta name="author" content="SitePoint">
  51. <link rel="stylesheet" href="css/styles.css?v=1.0">';
  52. print '</head>';
  53. print '<body>';
  54. $_SESSION['SMP_CURRENT_PAYMENT'] = GETPOST('smp-status');
  55. print '<script type="application/javascript">
  56. window.onload = function() {
  57. window.close();
  58. };
  59. </script>';
  60. print "Transaction status registered, you can close this";
  61. print '</body></html>';
  62. exit();
  63. }
  64. print 'NOOP';