Example #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();
 }
Example #2
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.'));
 }
Example #3
0
 /**
  * Internal constructor
  *
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $paymentCode = $this->_getCheckout()->getQuote()->getPayment()->getMethod();
     if (in_array($paymentCode, $this->_hssHelper->getHssMethods())) {
         $this->_paymentMethodCode = $paymentCode;
         $templatePath = str_replace('_', '', $paymentCode);
         $templateFile = "{$templatePath}/iframe.phtml";
         $directory = $this->_filesystem->getDirectoryRead(DirectoryList::MODULES);
         $file = $this->resolver->getTemplateFileName($templateFile, ['module' => 'Magento_Paypal']);
         if ($file && $directory->isExist($directory->getRelativePath($file))) {
             $this->setTemplate($templateFile);
         } else {
             $this->setTemplate('hss/iframe.phtml');
         }
     }
 }
Example #4
0
 /**
  * @return void
  */
 protected function _construct()
 {
     parent::_construct();
     $this->setTransportName(\Magento\Paypal\Model\Payment\Method\Billing\AbstractAgreement::TRANSPORT_BILLING_AGREEMENT_ID);
 }