title: CodeIgniter session data is lost after user is redirected back to the website from payment gateway
body: <p>I am working on a project in CodeIgniter 3. A user can make an online payment via paytm payment gateway on the booking page.</p>
  
  <p>After the user completes the payment process, he is redirected back to my website which is handled by a response controller where I am updating the booking details like the payment method and booking status using the booking id stored in the session. The session data is not available when I try to access it in this controller.</p>
  
  <p>This is my session configuration:</p>
  
  <pre><code> $config['sess_driver'] = 'files';
   $config['sess_cookie_name'] = 'ci_session';
   $config['sess_expiration'] = 7200;
   $config['sess_save_path'] = BASEPATH . 'cache/sessions/';
   $config['sess_match_ip'] = FALSE;
   $config['sess_time_to_update'] = 300;
   $config['sess_regenerate_destroy'] = FALSE;
  </code></pre>
  
  <p>This is the controller which handles the response sent by payment gateway</p>
  
  <pre><code>public function paytmResponse(){
      $this-&gt;load-&gt;model('booking_model');
      $this-&gt;load-&gt;model('user_model');
      $this-&gt;load-&gt;library('paytm');
      $paytmChecksum = isset($_POST["CHECKSUMHASH"]) ? $_POST["CHECKSUMHASH"] : ""; 
      $this-&gt;booking_model-&gt;updatePaymentType($_SESSION['bid'], 'online');
      $valid_checksum = $this-&gt;paytm-&gt;verifyChecksum($_POST, $paytmChecksum);
      if($valid_checksum){
          if($_POST["STATUS"] == "TXN_SUCCESS"){  
              $this-&gt;booking_model-&gt;savePaymentDetails($_SESSION['bid']);
              $this-&gt;booking_model-&gt;updateBookingStatus($_SESSION['bid'], 'pending');
              $status = 1; 
          }
          else{
              $this-&gt;booking_model-&gt;updateBookingStatus($_SESSION['bid'], 'failed');
              $status = 0;
          }
      }
      else{
          $this-&gt;booking_model-&gt;updateBookingStatus($_SESSION['bid'], 'failed');
          $status = 2;
      }       
      if($status == 1){        
          redirect('booking/success');
      }    
      else{  
          $_SESSION['booking_error'] = 'Payment failed';         
          redirect('booking/failure');
      }
  }
  </code></pre>
  
  <p>I am using the codeigniter session library, php version 7.2</p>