/** * 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(); }
/** * @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(); }
/** * 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.')); }
/** * Render block HTML * * @return string */ protected function _toHtml() { $this->_eventManager->dispatch('payment_form_block_to_html_before', ['block' => $this]); return parent::_toHtml(); }
/** * @return void */ protected function _construct() { parent::_construct(); $this->setTransportName(\Magento\Paypal\Model\Payment\Method\Billing\AbstractAgreement::TRANSPORT_BILLING_AGREEMENT_ID); }
/** * 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; }
public function _prepareLayout() { return parent::_prepareLayout(); }
/** * 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(); }
/** * @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; }
/** * Render block HTML * * @return string */ protected function _toHtml() { $this->setChild('cards', $this->getCardsBlock()); $this->setChild('method_form_block', $this->getMethodFormBlock()); return parent::_toHtml(); }