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
ee09cf18
Commit
ee09cf18
authored
Nov 03, 2017
by
Rik ter Beek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add duplicate check into notificaiton processing and fix formatting
parent
058eb3c0
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
107 additions
and
65 deletions
+107
-65
Model/Cron.php
Model/Cron.php
+99
-58
Model/Notification.php
Model/Notification.php
+8
-7
No files found.
Model/Cron.php
View file @
ee09cf18
This diff is collapsed.
Click to expand it.
Model/Notification.php
View file @
ee09cf18
...
...
@@ -37,12 +37,12 @@ class Notification extends \Magento\Framework\Model\AbstractModel
const
ERROR
=
'ERROR'
;
const
REFUND
=
'REFUND'
;
const
REFUND_FAILED
=
'REFUND_FAILED'
;
const
CANCEL_OR_REFUND
=
'CANCEL_OR_REFUND'
;
const
CANCEL_OR_REFUND
=
'CANCEL_OR_REFUND'
;
const
CAPTURE
=
'CAPTURE'
;
const
CAPTURE_FAILED
=
'CAPTURE_FAILED'
;
const
CANCELLATION
=
'CANCELLATION'
;
const
POSAPPROVED
=
'POS_APPROVED'
;
const
HANDLED_EXTERNALLY
=
'HANDLED_EXTERNALLY'
;
const
HANDLED_EXTERNALLY
=
'HANDLED_EXTERNALLY'
;
const
MANUAL_REVIEW_ACCEPT
=
'MANUAL_REVIEW_ACCEPT'
;
const
MANUAL_REVIEW_REJECT
=
'MANUAL_REVIEW_REJECT '
;
const
RECURRING_CONTRACT
=
"RECURRING_CONTRACT"
;
...
...
@@ -86,11 +86,12 @@ class Notification extends \Magento\Framework\Model\AbstractModel
* @param $eventCode
* @param $success
* @param $originalReference
* @return bool (true if the notification is a duplicate)
* @param null $done
* @return bool
*/
public
function
isDuplicate
(
$pspReference
,
$eventCode
,
$success
,
$originalReference
)
public
function
isDuplicate
(
$pspReference
,
$eventCode
,
$success
,
$originalReference
,
$done
=
null
)
{
$result
=
$this
->
getResource
()
->
getNotification
(
$pspReference
,
$eventCode
,
$success
,
$originalReference
);
$result
=
$this
->
getResource
()
->
getNotification
(
$pspReference
,
$eventCode
,
$success
,
$originalReference
,
$done
);
return
(
empty
(
$result
))
?
false
:
true
;
}
...
...
@@ -148,7 +149,7 @@ class Notification extends \Magento\Framework\Model\AbstractModel
{
return
$this
->
setData
(
self
::
ORIGINAL_REFERENCE
,
$originalReference
);
}
/**
* Gets the Merchantreference for the notification.
*
...
...
@@ -315,7 +316,7 @@ class Notification extends \Magento\Framework\Model\AbstractModel
{
return
$this
->
setData
(
self
::
LIVE
,
$live
);
}
/**
* Gets the AdditionalData for the notification.
*
...
...
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