Netshell/Paypal "Class Paypal does not exist" FIX

Submitted by escapeboy - 8 years ago

In some cases Netshell/Paypal throws error "Class Paypal does not exist". In my case on ubuntu/php7/nginx (on windows with apache is ok). So here is simple workaround

        $paypal = new \Netshell\Paypal\Paypal;
        $this->_apiContext = $paypal->ApiContext(
            config('services.paypal.client_id'),
            config('services.paypal.secret'));

        $this->_apiContext->setConfig([
            'mode' => 'sandbox',
            'service.EndPoint' => 'https://api.sandbox.paypal.com',
            'http.ConnectionTimeOut' => 30,
            'log.LogEnabled' => true,
            'log.FileName' => storage_path('logs/paypal.log'),
            'log.LogLevel' => 'FINE'
        ]);