File is not downloading after redirecting to payment succes page

`I have integrate a payment gateway. I pass the project id in returning url(see below)
“return_url” => ‘http://127.0.0.1:8000/success/?order_id={order_id}&order_token={order_token}&project_id=’ . $request->input(‘project_id’)

I am trying to download the file on that id in the database. but the file is not downloading.
`

   public function Success(Request $request)
     {
        $url = $request->fullUrl();
        $parsedUrl = parse_url($url);
        $query = $parsedUrl['query'] ?? ''
        parse_str($query, $queryParams); 
        
        $project_id = $queryParams['project_id'] ?? null;
        
        $project = Project::find($project_id);
        
        if (!$project) {
            return back()->with('error', 'Project not found');
        }
        
            $filePath = $project->file;
            $filelocation = public_path("upload/files/$filePath");
          
            $response = response()->download($filelocation);

              } 

             

I tried every possible way. tried to dd($filelocation) the location is ok.