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 acbd2670 authored by Alessio Zampatti's avatar Alessio Zampatti Committed by GitHub

PW-515: added fix for Test Notifications (#289)

* PW-515: added fix for Test Notifications

* PW-515: removed old check

* PW-515: added comment
parent 73e31065
...@@ -99,7 +99,7 @@ class Json extends \Magento\Framework\App\Action\Action ...@@ -99,7 +99,7 @@ class Json extends \Magento\Framework\App\Action\Action
$notificationMode = isset($notificationItems['live']) ? $notificationItems['live'] : ""; $notificationMode = isset($notificationItems['live']) ? $notificationItems['live'] : "";
if ($notificationMode != "" && $this->_validateNotificationMode($notificationMode)) { if ($notificationMode !== "" && $this->_validateNotificationMode($notificationMode)) {
foreach ($notificationItems['notificationItems'] as $notificationItem) { foreach ($notificationItems['notificationItems'] as $notificationItem) {
...@@ -154,7 +154,8 @@ class Json extends \Magento\Framework\App\Action\Action ...@@ -154,7 +154,8 @@ class Json extends \Magento\Framework\App\Action\Action
{ {
$mode = $this->_adyenHelper->getAdyenAbstractConfigData('demo_mode'); $mode = $this->_adyenHelper->getAdyenAbstractConfigData('demo_mode');
if (($mode == '1' && $notificationMode == "false") || ($mode == '0' && $notificationMode == 'true')) { // Notification mode can be a string or a boolean
if (($mode == '1' && ($notificationMode == "false" || $notificationMode == false)) || ($mode == '0' && ($notificationMode == 'true' || $notificationMode == true))) {
return true; return true;
} }
return false; return false;
......
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