예제 #1
0
파일: Form.php 프로젝트: koliaGI/magento2
 /**
  * @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.php 프로젝트: Adyen/adyen-magento2
 /**
  * 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
파일: Form.php 프로젝트: kid17/magento2
 /**
  * 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
파일: Form.php 프로젝트: aiesh/magento2
 /**
  * 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();
 }