title: Troubleshooting composer: classes not autoloading with CodeIgniter 3
body: <p><strong>Problem</strong></p>
  
  <p>I am trying to use the PayPal Checkout REST SDK which requires the PayPal library to be autoloaded through composer. I have gone through the steps to enable Composer in CodeIgniter 3 but when I go to my controller where I am autoloading the <code>PayPal\Rest\ApiContext</code> class I get the following error:</p>
  
  <blockquote>
    <p>Fatal error: Class 'PayPal\Rest\ApiContext' not found in
    C:\xampp\htdocs\php\toucan-talk\App\modules\paypal\controllers\Paypal.php
    on line 15</p>
  </blockquote>
  
  <p><strong>What I have so far</strong></p>
  
  <p>Here is my composer.json file</p>
  
  <pre><code>{
      "require": {
          "paypal/rest-api-sdk-php" : "*"
      }
  }
  </code></pre>
  
  <p>I have set <code>$config['composer_autoload'] = TRUE;</code> in my config.php file.</p>
  
  <p>Here is my controller</p>
  
  <pre><code>&lt;?php
  
  use PayPal\Rest\ApiContext;
  
  class Paypal extends MX_Controller
  {
      public function __construct()
      {
          $api = new ApiContext(
  
          );
          var_dump($api);
      }
  
  }
  </code></pre>
  
  <p><strong>Question</strong></p>
  
  <p>How do I troubleshoot composer and its autoloader so that I can pinpoint where the autoload process is failing.</p>