Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Iframe.php
Go to the documentation of this file.
1 <?php
7 
15 {
21  protected $_paymentData = null;
22 
33  public function __construct(
34  \Magento\Framework\View\Element\Template\Context $context,
35  \Magento\Sales\Model\OrderFactory $orderFactory,
36  \Magento\Checkout\Model\Session $checkoutSession,
37  \Magento\Paypal\Helper\Hss $hssHelper,
38  \Magento\Framework\Filesystem\Directory\ReadFactory $readFactory,
39  \Magento\Framework\Module\Dir\Reader $reader,
40  \Magento\Payment\Helper\Data $paymentData,
41  array $data = []
42  ) {
43  $this->_paymentData = $paymentData;
44  parent::__construct($context, $orderFactory, $checkoutSession, $hssHelper, $readFactory, $reader, $data);
45  }
46 
52  protected function _construct()
53  {
54  parent::_construct();
55  $this->_paymentMethodCode = \Magento\Paypal\Model\Config::METHOD_PAYFLOWLINK;
56  }
57 
63  public function getFrameActionUrl()
64  {
65  return $this->getUrl('paypal/payflow/form', ['_secure' => true]);
66  }
67 
73  public function getSecureToken()
74  {
75  return $this->_getOrder()->getPayment()->getAdditionalInformation('secure_token');
76  }
77 
83  public function getSecureTokenId()
84  {
85  return $this->_getOrder()->getPayment()->getAdditionalInformation('secure_token_id');
86  }
87 
93  public function getTransactionUrl()
94  {
95  $cgiUrl = 'cgi_url';
96  if ($this->isTestMode()) {
97  $cgiUrl = 'cgi_url_test_mode';
98  }
99  return $this->_paymentData->getMethodInstance($this->_paymentMethodCode)->getConfigData($cgiUrl);
100  }
101 
107  public function isTestMode()
108  {
109  $mode = $this->_paymentData->getMethodInstance($this->_paymentMethodCode)->getConfigData('sandbox_flag');
110  return (bool)$mode;
111  }
112 }
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode
Definition: grid.phtml:15