We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit 81a07478 authored by Aleffio's avatar Aleffio

uncommented code for creating credit memos after notification from BO

parent d00f0689
......@@ -1076,19 +1076,15 @@ class Cron
$lastTransactionId = $this->_order->getPayment()->getLastTransId();
if ($lastTransactionId != $this->_pspReference) {
// refund is done through adyen backoffice so create an invoice
// refund is done through adyen backoffice so create a credit memo
$order = $this->_order;
if ($order->canCreditmemo()) {
// there is a bug in this function of Magento see #2656 magento\magento2 repo
// Invalid method Magento\Sales\Model\Order\Creditmemo::register
/*
$currency = $this->_order->getOrderCurrencyCode();
$amount = $this->_adyenHelper->originalAmount($this->_value, $currency);
$order->getPayment()->registerRefundNotification($amount);
*/
$this->_adyenLogger->addAdyenNotificationCronjob('Please create your credit memo inside magento');
$this->_adyenLogger->addAdyenNotificationCronjob('Created credit memo for order');
} else {
$this->_adyenLogger->addAdyenNotificationCronjob('Could not create a credit memo for order');
}
......
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