Пример #1
0
 /**
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Payment\Model\Config $paymentConfig
  * @param \Magento\Backend\Model\Session\Quote $sessionQuote
  * @param \Magento\BraintreeTwo\Gateway\Config\Config $gatewayConfig
  * @param \Magento\BraintreeTwo\Model\Adminhtml\Source\CcType $ccType
  * @param array $data
  */
 public function __construct(Context $context, Config $paymentConfig, Quote $sessionQuote, GatewayConfig $gatewayConfig, CcType $ccType, array $data = [])
 {
     parent::__construct($context, $paymentConfig, $data);
     $this->sessionQuote = $sessionQuote;
     $this->gatewayConfig = $gatewayConfig;
     $this->ccType = $ccType;
 }
Пример #2
0
 /**
  * Cc constructor.
  *
  * @param \Magento\Framework\View\Element\Template\Context $context
  * @param \Magento\Payment\Model\Config $paymentConfig
  * @param \Adyen\Payment\Helper\Data $adyenHelper
  * @param \Magento\Checkout\Model\Session $checkoutSession
  * @param array $data
  */
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Payment\Model\Config $paymentConfig, \Adyen\Payment\Helper\Data $adyenHelper, \Magento\Checkout\Model\Session $checkoutSession, array $data = [])
 {
     parent::__construct($context, $paymentConfig);
     $this->_adyenHelper = $adyenHelper;
     $this->_appState = $context->getAppState();
     $this->_checkoutSession = $checkoutSession;
 }
Пример #3
0
 /**
  * Internal constructor. Set template
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setTemplate('form.phtml');
 }
Пример #4
0
 /**
  * Returns transparent method service
  *
  * @return TransparentInterface
  * @throws LocalizedException
  */
 public function getMethod()
 {
     $method = parent::getMethod();
     if (!$method instanceof TransparentInterface) {
         throw new LocalizedException(__('We cannot retrieve the transparent payment method model object.'));
     }
     return $method;
 }
Пример #5
0
 /**
  * Render block HTML
  * If method is not directpost - nothing to return
  *
  * @return string
  */
 protected function _toHtml()
 {
     return $this->getMethod()->getCode() == $this->_model->getCode() ? parent::_toHtml() : '';
 }
Пример #6
0
 public function __construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Payment\Model\Config $paymentConfig, \Monetra\Monetra\Helper\ClientTicketData $clientTicketData, array $data = [])
 {
     parent::__construct($context, $paymentConfig, $data);
     $this->ticketRequestData = (object) $clientTicketData->generateTicketRequestData();
 }