From 07caffa167e128707a8096a91303cfafe8cf69df Mon Sep 17 00:00:00 2001 From: Michiel Gerritsen Date: Mon, 2 Sep 2024 10:01:53 +0200 Subject: [PATCH] WIP --- Model/Client/Orders/Processors/SuccessfulPayment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Model/Client/Orders/Processors/SuccessfulPayment.php b/Model/Client/Orders/Processors/SuccessfulPayment.php index 7ddb6925f91..3556fa16eac 100644 --- a/Model/Client/Orders/Processors/SuccessfulPayment.php +++ b/Model/Client/Orders/Processors/SuccessfulPayment.php @@ -149,8 +149,8 @@ public function process(OrderInterface $order, Order $mollieOrder, string $type, $this->sendOrderEmails($order); } - if ($mollieOrder->amountCaptured !== null && $mollieOrder->amountCaptured->value != '0.00') { - $this->processCaptures->execute($order, $mollieOrder->captures()); + if ($payment && $mollieOrder->amountCaptured !== null && $mollieOrder->amountCaptured->value != '0.00') { + $this->processCaptures->execute($order, $payment->captures()); } $result = ['success' => true, 'status' => $mollieOrder->status, 'order_id' => $orderId, 'type' => $type];