_checkoutSession = $checkoutSession; parent::__construct($context); } /** * Get template for button in order review page if HSS method was selected * * @param string $name template name * @return string */ public function getReviewButtonTemplate($name) { $quote = $this->_checkoutSession->getQuote(); if ($quote) { $payment = $quote->getPayment(); if ($payment && in_array($payment->getMethod(), $this->_hssMethods)) { return $name; } } return ''; } /** * Get methods * * @return string[] */ public function getHssMethods() { return $this->_hssMethods; } }