php - Laravel 4.2 and PayPal SDK -


can tell me why i'm getting following error:

exception 'symfony\component\debug\exception\fatalerrorexception' message 'class 'paypal\rest\apicontext' not found' 

here controller code:

<?php  use paypal\rest\apicontext; use paypal\auth\oauthtokencredential; use paypal\api\amount; use paypal\api\details; use paypal\api\item; use paypal\api\itemlist; use paypal\api\payer; use paypal\api\payment; use paypal\api\redirecturls; use paypal\api\executepayment; use paypal\api\paymentexecution; use paypal\api\transaction;  class paypalpaymentcontroller extends basecontroller {      private $_api_context;      public function __construct() {           // setup paypal api context         $paypal_conf = config::get('paypal');         $this->_api_context = new apicontext(new oauthtokencredential($paypal_conf['client_id'], $paypal_conf['secret']));         $this->_api_context->setconfig($paypal_conf['settings']);      } 

i'm not sure service provider needs be, either... fill in blank @ least?

i installed package composer on l5 installation , worked, here's think you:

if you're not using composer, remove related paypal , use it, helps.. lot.

remove paypal package composer.json, composer update, composer dumpautoload, php artisan cache:clear.

add package again, did "paypal/rest-api-sdk-php": "1.3.*". composer update.

test using php artisan tinker, this: new paypal\rest\apicontext(), should return blue lines describing object.

i believe composer problem, had same problem payment package, nothing namespaced, used classmap loading, paypal uses psr-0. question: not namespaced, classmap loaded package required composer makes php throw class not found


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -