Description
The Creditmemo status updating has to be skipped if the Creditmemo is not available.
Steps to reproduce
a refund webhook arrives for an order that has no existing adyen_creditmemo record AND $order->canCreditmemo() returns false
Actual behavior
The cron job tries to update the creditmemo status even if the creditmemo doesn't exist.
Expected behavior
No errors on cron job, status updating is skipped if the Creditmemo wasn't created.
Code snippet or screenshots (if applicable)
Adyen Magento Plugin version
10.10.2
Magento version
2.4.8-p4
Operating System
None
Browser (if applicable)
No response
Additional context and logs
report.ERROR: Cron Job adyen_payment_process_notification has an error: Adyen\Payment\Helper\Creditmemo::updateAdyenCreditmemosStatus(): Argument #1 ($adyenCreditmemo) must be of type Adyen\Payment\Api\Data\CreditmemoInterface, null given, called in /vendor/adyen/module-payment/Helper/Order.php on line 629
Description
The Creditmemo status updating has to be skipped if the Creditmemo is not available.
Steps to reproduce
a refund webhook arrives for an order that has no existing
adyen_creditmemorecord AND $order->canCreditmemo() returns falseActual behavior
The cron job tries to update the creditmemo status even if the creditmemo doesn't exist.
Expected behavior
No errors on cron job, status updating is skipped if the Creditmemo wasn't created.
Code snippet or screenshots (if applicable)
Adyen Magento Plugin version
10.10.2
Magento version
2.4.8-p4
Operating System
None
Browser (if applicable)
No response
Additional context and logs
report.ERROR: Cron Job adyen_payment_process_notification has an error: Adyen\Payment\Helper\Creditmemo::updateAdyenCreditmemosStatus(): Argument #1 ($adyenCreditmemo) must be of type Adyen\Payment\Api\Data\CreditmemoInterface, null given, called in /vendor/adyen/module-payment/Helper/Order.php on line 629