Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Hss.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Paypal\Helper;
7 
12 {
18  protected $_hssMethods = [
22  ];
23 
27  protected $_checkoutSession;
28 
35  public function __construct(
36  \Magento\Framework\App\Helper\Context $context,
37  \Magento\Checkout\Model\Session $checkoutSession
38  ) {
39  $this->_checkoutSession = $checkoutSession;
40  parent::__construct($context);
41  }
42 
49  public function getReviewButtonTemplate($name)
50  {
51  $quote = $this->_checkoutSession->getQuote();
52  if ($quote) {
53  $payment = $quote->getPayment();
54  if ($payment && in_array($payment->getMethod(), $this->_hssMethods)) {
55  return $name;
56  }
57  }
58  return '';
59  }
60 
66  public function getHssMethods()
67  {
68  return $this->_hssMethods;
69  }
70 }
$quote
$payment
Definition: order.php:17
__construct(\Magento\Framework\App\Helper\Context $context, \Magento\Checkout\Model\Session $checkoutSession)
Definition: Hss.php:35
getReviewButtonTemplate($name)
Definition: Hss.php:49
if(!isset($_GET['name'])) $name
Definition: log.php:14