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 bc5001c3 authored by Rik ter Beek's avatar Rik ter Beek

Fixes #112 delay the RECURRING_CONTRACT notification processing

parent f7bc9e07
......@@ -234,6 +234,19 @@ class Cron
sprintf("Processing notification %s", $notification->getEntityId())
);
/**
* If the event is a RECURRING_CONTRACT wait an extra 5 minutes
* before processing so we are sure the RECURRING_CONTRACT
*/
if (trim($notification->getEventCode() == Notification::RECURRING_CONTRACT) &&
strtotime($notification->getCreatedAt()) >= strtotime('-5 minutes', time())) {
$this->_adyenLogger->addAdyenNotificationCronjob(
"This is a recurring_contract notification wait an extra 5 minutes
before processing this to make sure the contract exists"
);
continue;
}
// log the executed notification
$this->_adyenLogger->addAdyenNotificationCronjob(print_r($notification->debug(), 1));
......
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