title: Using pre existing library in Symfony
body: <p>I am new to Symfony. I am trying to use a pre existing library that I have used for my Payment Gateway API, with Symfony (v2.3). </p>
  
  <p>Before using Symfony I would have a <code>composer.json</code> file in the root directory and I would simply use PHP <code>require 'vendor/Braintree...</code>. However with Symfony I am having a really difficult time using the library for payment gateway API by importing it to my Controller. </p>
  
  <p><strong>Note:</strong> I am using an Entity in the same controller as follows, which has a similar directory structure and works great:</p>
  
  <p><code>use Jets\JetsBundle\Entity\Company;</code></p>
  
  <p>This is what I tried to use the payment gateway API:</p>
  
  <pre><code>use Jets\JetsBundle\Braintree\braintree\braintree_php\lib\Braintree;
  </code></pre>
  
  <p>and the <code>Braintree.php</code> contains:</p>
  
  <p><code>namespace Widb\WidbBundle\Braintree\braintree\braintree_php\lib;</code></p>
  
  <p>I keep getting the following error:</p>
  
  <p><code>FatalErrorException: Error: Class 'Jets\JetsBundle\Controller\Braintree_Configuration' not found in C:\xampp\htdocs\www\symfony\src\Jets\JetsBundle\Controller\DefaultController.php line 239</code></p>
  
  <p>And the <code>DefaultController.php</code> Line 239 contains:</p>
  
  <p><code>Braintree_Configuration::environment('sandbox');</code></p>
  
  <p>As a side note, I didn't do anything other than drag / drop the ready configured library directory from my old server to the Symfony directory on the new server. Am I missing some configuration script or <code>cmd</code> set up or something?</p>
  
  <p>I appreciate any assistance in this regard. I will forever be grateful is someone can help me troubleshoot this.</p>
  
  <p>Here is my <code>DefaultController.php</code> code:</p>
  
  <p><a href="http://pastebin.com/kwisEBzL" rel="noreferrer">http://pastebin.com/kwisEBzL</a></p>
  
  <p>Many thanks in advance!</p>