iframe.phtml 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. // @codingStandardsIgnoreFile
  7. /**
  8. * @var $block \Magento\Authorizenet\Block\Transparent\Iframe
  9. */
  10. $params = $block->getParams();
  11. $helper = $block->getHelper('adminhtml');
  12. ?>
  13. <html>
  14. <head>
  15. <script>
  16. <?php if (isset($params['redirect'])): ?>
  17. window.location="<?= $block->escapeUrl($params['redirect']) ?>";
  18. <?php endif; ?>
  19. <?php if (isset($params['redirect_parent'])): ?>
  20. window.top.location="<?= $block->escapeUrl($params['redirect_parent']) ?>";
  21. <?php endif; ?>
  22. <?php if (isset($params['error_msg'])): ?>
  23. window.top.directPostModel.showError(<?= /* @noEscape */ json_encode((array)$params['error_msg']) ?>);
  24. <?php if (isset($params['x_invoice_num'])): ?>
  25. window.top.directPostModel.successUrl="<?= $block->escapeUrl($helper->getSuccessOrderUrl($params)) ?>";
  26. <?php endif; ?>
  27. <?php endif; ?>
  28. </script>
  29. </head>
  30. <body></body>
  31. </html>