We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit d70c3a0c authored by Rik ter Beek's avatar Rik ter Beek

#51 add https for 3d secure page return if shop is on https

parent 403f01e1
......@@ -41,6 +41,11 @@ class Validate3d extends \Magento\Payment\Block\Form
*/
protected $_order;
/**
* @var \Magento\Framework\App\RequestInterface
*/
protected $_request;
/**
* Validate3d constructor.
*
......@@ -53,10 +58,12 @@ class Validate3d extends \Magento\Payment\Block\Form
\Magento\Framework\View\Element\Template\Context $context,
array $data = [],
\Magento\Sales\Model\OrderFactory $orderFactory,
\Magento\Checkout\Model\Session $checkoutSession
\Magento\Checkout\Model\Session $checkoutSession,
\Magento\Framework\App\RequestInterface $request
) {
$this->_orderFactory = $orderFactory;
$this->_checkoutSession = $checkoutSession;
$this->_request = $request;
parent::__construct($context, $data);
$this->_getOrder();
}
......@@ -114,8 +121,18 @@ class Validate3d extends \Magento\Payment\Block\Form
*/
public function getTermUrl()
{
return $this->getUrl('adyen/process/validate3d');
return $this->getUrl('adyen/process/validate3d',
['_secure' => $this->_getRequest()->isSecure()]);
}
/**
* Retrieve request object
*
* @return \Magento\Framework\App\RequestInterface
*/
protected function _getRequest()
{
return $this->_request;
}
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment