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
488161ba
Commit
488161ba
authored
Jul 18, 2017
by
Rik ter Beek
Committed by
GitHub
Jul 18, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #141 from Adyen/develop
Merge "Develop"
parents
41f072c6
4737c28a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
1 deletion
+43
-1
Model/Cron.php
Model/Cron.php
+10
-0
Setup/UpgradeSchema.php
Setup/UpgradeSchema.php
+32
-0
etc/module.xml
etc/module.xml
+1
-1
No files found.
Model/Cron.php
View file @
488161ba
...
...
@@ -224,8 +224,17 @@ class Cron
// create collection
$notifications
=
$this
->
_notificationFactory
->
create
();
$notifications
->
addFieldToFilter
(
'done'
,
0
);
$notifications
->
addFieldToFilter
(
'processing'
,
0
);
$notifications
->
addFieldToFilter
(
'created_at'
,
$dateRange
);
foreach
(
$notifications
as
$notification
)
{
// set Cron processing to true
$dateEnd
=
new
\DateTime
();
$notification
->
setProcessing
(
true
);
$notification
->
setUpdatedAt
(
$dateEnd
);
$notification
->
save
();
}
// loop over the notifications
$count
=
0
;
foreach
(
$notifications
as
$notification
)
{
...
...
@@ -322,6 +331,7 @@ class Cron
// set done to true
$dateEnd
=
new
\DateTime
();
$notification
->
setDone
(
true
);
$notification
->
setProcessing
(
false
);
$notification
->
setUpdatedAt
(
$dateEnd
);
$notification
->
save
();
$this
->
_adyenLogger
->
addAdyenNotificationCronjob
(
...
...
Setup/UpgradeSchema.php
View file @
488161ba
...
...
@@ -59,6 +59,10 @@ class UpgradeSchema implements UpgradeSchemaInterface
$this
->
updateSchemaVersion204
(
$setup
);
}
if
(
version_compare
(
$context
->
getVersion
(),
'2.0.7'
,
'<'
))
{
$this
->
updateSchemaVersion207
(
$setup
);
}
$setup
->
endSetup
();
}
...
...
@@ -262,4 +266,32 @@ class UpgradeSchema implements UpgradeSchemaInterface
]
);
}
/**
* Upgrade to 2.0.7
*
* @param SchemaSetupInterface $setup
* @return void
*/
public
function
updateSchemaVersion207
(
SchemaSetupInterface
$setup
)
{
$connection
=
$setup
->
getConnection
();
$tableName
=
$setup
->
getTable
(
'adyen_notification'
);
$adyenNotificationProcessingColumn
=
[
'type'
=>
Table
::
TYPE_BOOLEAN
,
'length'
=>
1
,
'nullable'
=>
true
,
'default'
=>
0
,
'comment'
=>
'Adyen Notification Cron Processing'
,
'after'
=>
\Adyen\Payment\Model\Notification
::
DONE
];
$connection
->
addColumn
(
$tableName
,
'processing'
,
$adyenNotificationProcessingColumn
);
}
}
\ No newline at end of file
etc/module.xml
View file @
488161ba
...
...
@@ -24,7 +24,7 @@
-->
<config
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"urn:magento:framework:Module/etc/module.xsd"
>
<module
name=
"Adyen_Payment"
setup_version=
"2.0.
6
"
>
<module
name=
"Adyen_Payment"
setup_version=
"2.0.
7
"
>
<sequence>
<module
name=
"Magento_Sales"
/>
<module
name=
"Magento_Quote"
/>
...
...
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