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 d0de38e2 authored by rikterbeek's avatar rikterbeek

fix exception when recurringContract is not found for cronjob

parent 426c103c
...@@ -810,12 +810,12 @@ class Cron ...@@ -810,12 +810,12 @@ class Cron
'(listRecurringCall did not contain contract)' '(listRecurringCall did not contain contract)'
); );
$this->_adyenLogger->addAdyenNotificationCronjob( $this->_adyenLogger->addAdyenNotificationCronjob(
printf('recurringDetailReference in notification is %1', $recurringDetailReference) sprintf('recurringDetailReference in notification is %1', $recurringDetailReference)
); );
$this->_adyenLogger->addAdyenNotificationCronjob( $this->_adyenLogger->addAdyenNotificationCronjob(
printf('CustomerReference is: %1 and storeId is %2', $customerReference, $storeId) sprintf('CustomerReference is: %1 and storeId is %2', $customerReference, $storeId)
); );
$this->_adyenLogger->addAdyenNotificationCronjob($listRecurringContracts); $this->_adyenLogger->addAdyenNotificationCronjob(print_r($listRecurringContracts, 1));
$message = __( $message = __(
'Failed to create billing agreement for this order ' . 'Failed to create billing agreement for this order ' .
'(listRecurringCall did not contain contract)' '(listRecurringCall did not contain contract)'
...@@ -855,8 +855,12 @@ class Cron ...@@ -855,8 +855,12 @@ class Cron
if ($order->canCreditmemo()) { if ($order->canCreditmemo()) {
// there is a bug in this function of Magento see #2656 magento\magento2 repo // there is a bug in this function of Magento see #2656 magento\magento2 repo
// $amount = $this->_adyenHelper->originalAmount($this->_value, $currency); // Invalid method Magento\Sales\Model\Order\Creditmemo::register
// $order->getPayment()->registerRefundNotification($amount); /*
$currency = $this->_order->getOrderCurrencyCode();
$amount = $this->_adyenHelper->originalAmount($this->_value, $currency);
$order->getPayment()->registerRefundNotification($amount);
*/
$this->_adyenLogger->addAdyenNotificationCronjob('Please create your credit memo inside magentos'); $this->_adyenLogger->addAdyenNotificationCronjob('Please create your credit memo inside magentos');
} else { } else {
......
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