Iframe.php 786 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Paypal\Block\Hosted\Pro;
  7. /**
  8. * Hosted Pro iframe block
  9. *
  10. * @author Magento Core Team <core@magentocommerce.com>
  11. */
  12. class Iframe extends \Magento\Paypal\Block\Iframe
  13. {
  14. /**
  15. * Internal constructor
  16. * Set payment method code
  17. *
  18. * @return void
  19. */
  20. protected function _construct()
  21. {
  22. parent::_construct();
  23. $this->_paymentMethodCode = \Magento\Paypal\Model\Config::METHOD_HOSTEDPRO;
  24. }
  25. /**
  26. * Get iframe action URL
  27. *
  28. * @return string
  29. */
  30. public function getFrameActionUrl()
  31. {
  32. return $this->_getOrder()->getPayment()->getAdditionalInformation('secure_form_url');
  33. }
  34. }