I am using a laravel paypal plugin called "srmklive/paypal". The plugin is worked in my local but not in the production server. When I check the logs it prompt me this error. This is the details of the server,
php version : 7.2 Laravel version : 5.8.8
Please help on this.
The logs show me this error :
production.ERROR: Class 'Srmklive\PayPal\Facades\Paypal' not found
{"exception":"[object](Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0):
Class 'Srmklive\\PayPal\\Facades\\Paypal' not found at /home/forge/pixerbear-api.tk/app/Http/Controllers/PaymentController.php:26)
Meanwhile my PaymentController :
use Auth;
use DB;
use App\Credit;
use App\Storage;
use App\Payment;
use App\ProviderStorage;
use App\UserCredit;
use Response;
use Carbon\Carbon;
use Illuminate\Support\Str;
use Srmklive\PayPal\Facades\Paypal;
use Srmklive\PayPal\Services\ExpressCheckout;
use Illuminate\Http\Request;
class PaymentController extends Controller
{
private $provider;
public function __construct()
{
$this->provider = new ExpressCheckout;
$this->provider = PayPal::setProvider('express_checkout');
}
}
答案 0 :(得分:0)
您可以在此处的命名空间中输入错误; use Srmklive\PayPal\Facades\Paypal;
。应该是use Srmklive\PayPal\Facades\PayPal;
(注意大写的P
)。