We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit d60631ae authored by rikterbeek's avatar rikterbeek

log result for hpp payment

parent 9d8740c5
...@@ -80,13 +80,6 @@ class Redirect extends \Magento\Payment\Block\Form ...@@ -80,13 +80,6 @@ class Redirect extends \Magento\Payment\Block\Form
return $result; return $result;
} }
public function test() {
$orderId = $this->_checkoutSession->getId();
$orderId = $this->_checkoutSession->getLastOrderId();
return "incrementIdd: " . $orderId;
// return "sdf";
}
public function getFormFields() public function getFormFields()
{ {
$result = array(); $result = array();
...@@ -102,7 +95,6 @@ class Redirect extends \Magento\Payment\Block\Form ...@@ -102,7 +95,6 @@ class Redirect extends \Magento\Payment\Block\Form
return $result; return $result;
} }
/** /**
* Get order object * Get order object
* *
......
...@@ -53,30 +53,40 @@ class Result extends \Magento\Framework\App\Action\Action ...@@ -53,30 +53,40 @@ class Result extends \Magento\Framework\App\Action\Action
*/ */
protected $_session; protected $_session;
/**
* @var \Adyen\Payment\Logger\AdyenLogger
*/
protected $_adyenLogger;
/** /**
* @param \Magento\Framework\App\Action\Context $context * @param \Magento\Framework\App\Action\Context $context
* @param \Adyen\Payment\Helper\Data $adyenHelper * @param \Adyen\Payment\Helper\Data $adyenHelper
* @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Magento\Sales\Model\OrderFactory $orderFactory
* @param \Magento\Sales\Model\Order\Status\HistoryFactory $orderHistoryFactory * @param \Magento\Sales\Model\Order\Status\HistoryFactory $orderHistoryFactory
* @param \Magento\Checkout\Model\Session $session * @param \Magento\Checkout\Model\Session $session
* @param \Adyen\Payment\Logger\AdyenLogger $adyenLogger
*/ */
public function __construct( public function __construct(
\Magento\Framework\App\Action\Context $context, \Magento\Framework\App\Action\Context $context,
\Adyen\Payment\Helper\Data $adyenHelper, \Adyen\Payment\Helper\Data $adyenHelper,
\Magento\Sales\Model\OrderFactory $orderFactory, \Magento\Sales\Model\OrderFactory $orderFactory,
\Magento\Sales\Model\Order\Status\HistoryFactory $orderHistoryFactory, \Magento\Sales\Model\Order\Status\HistoryFactory $orderHistoryFactory,
\Magento\Checkout\Model\Session $session \Magento\Checkout\Model\Session $session,
\Adyen\Payment\Logger\AdyenLogger $adyenLogger
) { ) {
$this->_adyenHelper = $adyenHelper; $this->_adyenHelper = $adyenHelper;
$this->_orderFactory = $orderFactory; $this->_orderFactory = $orderFactory;
$this->_orderHistoryFactory = $orderHistoryFactory; $this->_orderHistoryFactory = $orderHistoryFactory;
$this->_session = $session; $this->_session = $session;
$this->_adyenLogger = $adyenLogger;
parent::__construct($context); parent::__construct($context);
} }
public function execute() public function execute()
{ {
$response = $this->getRequest()->getParams(); $response = $this->getRequest()->getParams();
$this->_adyenLogger->info(print_r($response, true));
$result = $this->validateResponse($response); $result = $this->validateResponse($response);
if ($result) { if ($result) {
......
...@@ -80,11 +80,17 @@ class Hpp extends \Magento\Payment\Model\Method\AbstractMethod implements Gatewa ...@@ -80,11 +80,17 @@ class Hpp extends \Magento\Payment\Model\Method\AbstractMethod implements Gatewa
*/ */
protected $resolver; protected $resolver;
/**
* @var \Adyen\Payment\Logger\AdyenLogger
*/
protected $_adyenLogger;
/** /**
* @param \Magento\Framework\UrlInterface $urlBuilder * @param \Magento\Framework\UrlInterface $urlBuilder
* @param \Adyen\Payment\Helper\Data $adyenHelper * @param \Adyen\Payment\Helper\Data $adyenHelper
* @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\Locale\ResolverInterface $resolver * @param \Magento\Framework\Locale\ResolverInterface $resolver
* @param \Adyen\Payment\Logger\AdyenLogger $adyenLogger
* @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Registry $registry
* @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory * @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory
...@@ -102,6 +108,7 @@ class Hpp extends \Magento\Payment\Model\Method\AbstractMethod implements Gatewa ...@@ -102,6 +108,7 @@ class Hpp extends \Magento\Payment\Model\Method\AbstractMethod implements Gatewa
\Adyen\Payment\Helper\Data $adyenHelper, \Adyen\Payment\Helper\Data $adyenHelper,
\Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\Locale\ResolverInterface $resolver, \Magento\Framework\Locale\ResolverInterface $resolver,
\Adyen\Payment\Logger\AdyenLogger $adyenLogger,
\Magento\Framework\Model\Context $context, \Magento\Framework\Model\Context $context,
\Magento\Framework\Registry $registry, \Magento\Framework\Registry $registry,
\Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory, \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory,
...@@ -129,6 +136,7 @@ class Hpp extends \Magento\Payment\Model\Method\AbstractMethod implements Gatewa ...@@ -129,6 +136,7 @@ class Hpp extends \Magento\Payment\Model\Method\AbstractMethod implements Gatewa
$this->_adyenHelper = $adyenHelper; $this->_adyenHelper = $adyenHelper;
$this->storeManager = $storeManager; $this->storeManager = $storeManager;
$this->resolver = $resolver; $this->resolver = $resolver;
$this->_adyenLogger = $adyenLogger;
} }
protected $_paymentMethodType = 'hpp'; protected $_paymentMethodType = 'hpp';
...@@ -290,6 +298,8 @@ class Hpp extends \Magento\Payment\Model\Method\AbstractMethod implements Gatewa ...@@ -290,6 +298,8 @@ class Hpp extends \Magento\Payment\Model\Method\AbstractMethod implements Gatewa
$formFields['merchantSig'] = $merchantSig; $formFields['merchantSig'] = $merchantSig;
$this->_adyenLogger->info(print_r($formFields, true));
return $formFields; return $formFields;
} }
......
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