laravel paypal ssl eror, package used srmklive / laravel-paypal

30 Views Asked by At

I am integrate laravel paypal by using srmklive laravel-paypal package (in sandbox and localhost) and send data from form to paypal function and receive the error

public function paypal(Request $request)
    {
       
        $provider = new PayPalClient;
        $provider->setApiCredentials(config('paypal'));
        $paypalToken = $provider->getAccessToken();
      dd($paypalToken);
    
......
}   

recieve the eroor when dump and die at this stage and (in case of full code it automatically redirect to cancel route) .

Error Received : array:1 [▼ // app\Http\Controllers\PaypalController.php:23 "error" => " cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api-m.sandbox.paypal.com/v1/oauth2/token ◀ " ]

1

There are 1 best solutions below

0
Preston PHX On

Download and correctly install an updated CA bundle for your PHP's curl.

Better yet, update or switch to a webserver with a current version of PHP, as whatever you are using is likely to have security vulnerabilities.