From 85b737d1db997af30f3c7aaf5802e1ae6ef5712f Mon Sep 17 00:00:00 2001 From: Michiel Gerritsen Date: Wed, 1 Jul 2020 10:36:21 +0200 Subject: [PATCH] Fix: The payments() method does not always exist --- app/code/community/Mollie/Mpm/Model/Client/Orders.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/community/Mollie/Mpm/Model/Client/Orders.php b/app/code/community/Mollie/Mpm/Model/Client/Orders.php index 5718a5c..af20637 100644 --- a/app/code/community/Mollie/Mpm/Model/Client/Orders.php +++ b/app/code/community/Mollie/Mpm/Model/Client/Orders.php @@ -198,7 +198,7 @@ public function processTransaction(Mage_Sales_Model_Order $order, $type = 'webho $this->orderLines->updateOrderLinesByWebhook($mollieOrder->lines, $mollieOrder->isPaid()); - $order->getPayment()->setAdditionalInformation('details', json_encode($mollieOrder->payments()[0]->details))->save(); + $order->getPayment()->setAdditionalInformation('details', json_encode($mollieOrder->_embedded->payments[0]->details))->save(); /** * Check if last payment was canceled, failed or expired and redirect customer to cart for retry.