Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Adyen Magento2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shared Libs
Adyen Magento2
Commits
d9cd0e8d
Commit
d9cd0e8d
authored
Mar 05, 2019
by
attilak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move notification log under authorization avoiding spamming the server
with large messages
parent
6cfc68a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
Controller/Process/Json.php
Controller/Process/Json.php
+7
-6
No files found.
Controller/Process/Json.php
View file @
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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment