Exemplo n.º 1
0
 /**
  * Set template and redirect message
  *
  * @return null
  */
 protected function _construct()
 {
     $pre = __METHOD__ . " : ";
     $this->_logger->debug($pre . 'bof');
     $this->_config = $this->payfastConfigFactory->create()->setMethod($this->getMethodCode());
     parent::_construct();
 }
Exemplo n.º 2
0
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param array $data
  * @param \Magento\Sales\Model\OrderFactory $orderFactory
  * @param \Magento\Checkout\Model\Session $checkoutSession
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, array $data = [], \Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Checkout\Model\Session $checkoutSession)
 {
     $this->_orderFactory = $orderFactory;
     $this->_checkoutSession = $checkoutSession;
     parent::__construct($context, $data);
     $this->_getOrder();
 }
Exemplo n.º 3
0
 /**
  * Set template and redirect message
  *
  * @return null
  */
 protected function _construct()
 {
     $this->_config = $this->_paypalConfigFactory->create()->setMethod($this->getMethodCode());
     $mark = $this->_getMarkTemplate();
     $mark->setPaymentAcceptanceMarkHref($this->_config->getPaymentMarkWhatIsPaypalUrl($this->_localeResolver))->setPaymentAcceptanceMarkSrc($this->_config->getPaymentMarkImageUrl($this->_localeResolver->getLocale()));
     // known issue: code above will render only static mark image
     $this->_initializeRedirectTemplateWithMark($mark);
     parent::_construct();
     $this->setRedirectMessage(__('You will be redirected to the PayPal website.'));
 }
Exemplo n.º 4
0
 /**
  * Render block HTML
  *
  * @return string
  */
 protected function _toHtml()
 {
     $this->_eventManager->dispatch('payment_form_block_to_html_before', ['block' => $this]);
     return parent::_toHtml();
 }
Exemplo n.º 5
0
 /**
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setTransportName(\Magento\Paypal\Model\Payment\Method\Billing\AbstractAgreement::TRANSPORT_BILLING_AGREEMENT_ID);
 }
Exemplo n.º 6
0
 /**
  * Boleto constructor.
  *
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Adyen\Payment\Helper\Data $adyenHelper
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Adyen\Payment\Helper\Data $adyenHelper, array $data = [])
 {
     parent::__construct($context, $data);
     $this->_adyenHelper = $adyenHelper;
 }
Exemplo n.º 7
0
 public function _prepareLayout()
 {
     return parent::_prepareLayout();
 }
Exemplo n.º 8
0
 /**
  * Render the block if needed
  *
  * @return string
  */
 protected function _toHtml()
 {
     if ($this->_isAfterPaymentSave()) {
         $this->setTemplate('hss/js.phtml');
         return parent::_toHtml();
     }
     if (!$this->_shouldRender) {
         return '';
     }
     return parent::_toHtml();
 }
Exemplo n.º 9
0
 /**
  * @param Context $context
  * @param TokensConfigProvider $tokensConfigProvider
  * @param CcConfigProvider $ccConfigProvider
  * @param array $data
  */
 public function __construct(Context $context, TokensConfigProvider $tokensConfigProvider, CcConfigProvider $ccConfigProvider, array $data = [])
 {
     parent::__construct($context, $data);
     $this->tokensProvider = $tokensConfigProvider;
     $this->cardConfigProvider = $ccConfigProvider;
 }
Exemplo n.º 10
0
 /**
  * Render block HTML
  *
  * @return string
  */
 protected function _toHtml()
 {
     $this->setChild('cards', $this->getCardsBlock());
     $this->setChild('method_form_block', $this->getMethodFormBlock());
     return parent::_toHtml();
 }