I am new to symfony. I am trying to use the pre-existing library that I used for my payment gateway API with Symfony (v2.3).
Before using Symfony, I will have the composer.json file in the root directory and I will just use PHP require 'vendor/Braintree... However, with Symfony, itβs very difficult for me to use the library for the payment gateway API by importing it into my controller.
Note. I use Entity in the same controller as in the previous example, which has a similar directory structure and works fine:
use Jets\JetsBundle\Entity\Company;
Here is what I tried to use the payment gateway API:
use Jets\JetsBundle\Braintree\braintree\braintree_php\lib\Braintree;
and Braintree.php contains:
namespace Widb\WidbBundle\Braintree\braintree\braintree_php\lib;
I keep getting the following error:
FatalErrorException: Error: Class 'Jets\JetsBundle\Controller\Braintree_Configuration' not found in C:\xampp\htdocs\www\symfony\src\Jets\JetsBundle\Controller\DefaultController.php line 239
And the line DefaultController.php Line 239 contains:
Braintree_Configuration::environment('sandbox');
As a side note, I did nothing but drag and drop the finished custom library directory from my old server to the Symfony directory on the new server. Is there any script or cmd configuration missing or something else?
I appreciate any help in this regard. I will always be grateful, someone can help me fix this problem.
Here is my DefaultController.php code:
http://pastebin.com/kwisEBzL
Thank you very much in advance!