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 a9085ca5 authored by cyattilakiss's avatar cyattilakiss Committed by GitHub

Merge pull request #413 from Adyen/PW-1025

PW-1025 Adyen\Payment\Controller\Process\Json logs any json request
parents 6cfc68a0 d9cd0e8d
......@@ -84,7 +84,6 @@ class Json extends \Magento\Framework\App\Action\Action
*/
public function execute()
{
// if version is in the notification string show the module version
$response = $this->getRequest()->getParams();
if (isset($response['version'])) {
......@@ -99,14 +98,10 @@ class Json extends \Magento\Framework\App\Action\Action
try {
$notificationItems = json_decode(file_get_contents('php://input'), true);
// log the notification
$this->_adyenLogger->addAdyenNotification(
"The content of the notification is: " . print_r($notificationItems, 1)
);
$notificationMode = isset($notificationItems['live']) ? $notificationItems['live'] : "";
if ($notificationMode !== "" && $this->_validateNotificationMode($notificationMode)) {
foreach ($notificationItems['notificationItems'] as $notificationItem) {
$status = $this->_processNotification(
$notificationItem['NotificationRequestItem'],
......@@ -178,6 +173,12 @@ class Json extends \Magento\Framework\App\Action\Action
{
// validate the notification
if ($this->authorised($response)) {
// log the notification
$this->_adyenLogger->addAdyenNotification(
"The content of the notification item is: " . print_r($response, 1)
);
// check if notification already exists
if (!$this->_isDuplicate($response)) {
try {
......
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