all(); if ($body === []) { $decoded = json_decode((string) $request->getContent(), true); $body = is_array($decoded) ? $decoded : []; } $result = app(ColleagueOrderCallbackService::class)->handleCallbackPayload($body, $order); return response()->json($result, !empty($result['ok']) ? 200 : 422); } }