I thought I'd share my experience with the community with an issue I had when sending test transactions to PayPal using the GF PayPal Add-on.
I was struggling earlier today when my HTTP posts to PayPal (via GravityForms PayPal Add-on) were not loading the PayPal Checkout Page. After stepping through my code with a debugger, I was able to capture the following validation exception when sending the HTTP request to PayPal:
SSL certificate problem, verify that the CA cert is OK
Typically, this is an indication that a CA (Certificate Authority) cert cannot be located on the webserver sending the HTTP Post. The CA cert is needed to verify the issuer of a SSL Certificate is from a trusted source.
After much troubleshooting and research, I was able to download a copy of a CA cert and verify I could send HTTP Posts via SSL using the CURL API in some test code. Sadly though, I was still receiving this "SSL certificate problem" exception when testing via the PayPal Plugin.
I then realized the PayPal plugin was using the WP_HTTP class to send HTTP Requests as seen in gravityformspaypal/paypal.php on LINE 2096:
$request = new WP_Http();
$response = $request->post($url, array("ssl" => true, "body" => $req));
I then modified the lines as follows.
//NOTE: Change WP_Http() to WP_Http_Curl()
$request = new WP_Http_Curl();
//NOTE: Changed $request->post to $request->request
$response = $request->request($url, array("ssl" => true, "body" => $req));
I was FINALLY able to access the PayPal checkout page via GravityForms PayPal Add-on after applying the changes and retesting my form submission.
OTHER NOTES:
This issue was isolated only to WordPress running on my Windows Development Machine and XAMPP. I had no issues on my production linux server. The new code works on both servers.
I hope this was helpful.