order->cart; $this->cartAsConvertedAction->execute($cart); $status = PaymentStatus::whereName(PaymentStatusEnum::Paid->value)->value('id'); if (! $status) { throw new NotFoundResourceException('Paid Status not found'); } $payment->payment_status_id = $status; $payment->save(); DB::commit(); return true; } catch (Throwable $e) { Log::error('Cannot mark order payment as paid', [$e->getMessage()]); DB::rollBack(); return false; } } }