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];