Sandbox: unable to get local issuer certificate for PayPal Checkout

WaffleBoy
Contributor
Contributor

Hello,

I am attempting to use PayPal checkout along side my already set-up payment gateway. The client side integration seems to be working fine, however, when trying to execute the payment and calling on a PHP file to store my data into a SQL database, however, I receive this error when the file is called. 

Fatal error: Uncaught BraintreeHttp\IOException: SSL certificate problem: unable to get local issuer certificate in C:\wamp64\www\site\vendor\braintree\braintreehttp\lib\BraintreeHttp\HttpClient.php on line 167

and  

BraintreeHttp\IOException: SSL certificate problem: unable to get local issuer certificate in C:\wamp64\www\BFM\vendor\braintree\braintreehttp\lib\BraintreeHttp\HttpClient.php on line 167

 

. Everything here is on the sandbox. The Sandbox does log the payment,however, This error prevents me to log this into my database. 

This is the php file the javascript redirects the onApprove functions to the code from "2. Server side"

https://developer.paypal.com/docs/checkout/integrate/#6-verify-the-transaction

 

I did install the composer sdk, and included a config file that has the appropriate api keys. 

I greatly appreciate any help. 

 

Login to Me Too
4 REPLIES 4

0problesm
New Community Member

¿has llegado a resolver el problema, me pasa lo mismo y no encuentro una solución clara?

Login to Me Too

enyor
Contributor
Contributor

Download curl pem <removed>

Update php ini

curl.cainfo=<path-to>cacert.pem

 

Restart php

Login to Me Too

MTS_Justin
Moderator
Moderator

Hello,

You can download the latest CA (certificate authority) bundle (cacert.pem) at the URL below :
https://curl.se/download.html

As mentioned above, download the latest CA bundle and specify the path to this new bundle within the PHP config file, then restart PHP.

Thanks !


Was my post helpful? If so, please give me a kudos!
Login to Me Too

Kyadondo
New Community Member

After downloading the new cacert.pem file, from https://curl.se/download.html

 

Navigate to this path "...\paypal\rest-api-sdk-php\lib\PayPal\Core" and replace the existing cacert.pem file with the new file you have downloaded.

 

Problem  solved. 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.