PayPal Integration
-
Hi,
Just trying this out with a view to buying support but I’m stuck at the first hurdle.
I have set up a paypal sandbox and filled in the API credentitials. I have ticked enable paypal, enable sandbox and enable debug.
Enable Paypal payment gateway
Enable Paypal
Enable Sandbox Mode
Enable Debug Mode. Display Response Messages on Checkout ScreenOn attempting to test buying a membership I get an error message.
Paypal Gateway Error:Array ( )
The site is behind a coming soon page but I’m happy to set up access if needed via a PM.
Many thanks,
John
-
Hi John,
Our LifterLMS Pro customers have the ability to send us private messages by submitting support tickets to us directly, and we can offer the deeper assistance to log into their staging environments to help identify and solve issues when necessary. But we don’t offer those things here in the forum. You can find out more about LifterLMS Pro here: https://lifterlms.com/product/lifterlms-pro/
But I’ll get your message into the queue for our support team to see if they can solve your PayPal issue here for you.
Thanks,
Well thanks for the reply but to be honest I think that’s not very encourageing.
So what you’re saying is that I have to spent a lot of money to evaluate whether the plugin is suitable for me. And as I’ve discovered a fault straight away with it it hardly encourages me to buy anything.
Well I’ll see if I get any free help but so far I’m not that impressed to be honest.
For your information I’ve completely uninstalled everything and started fresh with a new installtion of WordPress and LifterLMS only. I still get the error mentioned.
Many thanks,
John
Sorry if I sound grumpy ??Hi John,
We do offer free support here in the forum. The benefits of the premium support offered through LifterLMS Pro are that Pro customers can submit private tickets to us directly, we can offer a deeper level of assistance, Pro support requests are prioritized to receive faster responses, and Pro customers have access to a live weekly call with one of our developers. But LifterLMS Pro is an option and not a requirement for using LifterLMS. You can definitely stick with the free support here in the forum if you’d like.
Thank you for sending the additional information about your new installation attempt. Your messages are in the queue for our support team to get back with you on.
Thanks,
Thanks for the reply.
Further to what I’ve said before it works with a live PayPal setup, just get the error when I’m using the sandbox (with the sandbox API credentials)
Sorry for my harshness earlier. So far this is the best solution I’ve found. So quick and easy. Just this PayPal thing. I’d like to be able to test via the Paypal sandbox.
John
Hey John,
Took me a little while to track down what’s going on here. PayPal is a little obtuse sometimes and they’re returning a very helpful error response. After some digging I’ve found the issue is currently only occurring in the Sandbox.
As per an update to PayPal’s security guidelines, PayPal will be switching to utilize HTTP 1.1 as of June 17, 2016. PayPal updates their sandbox’s early and these new security measures are in place now in preparation for the June update on live servers. We utilize
wp_remote_post()
to initiate the PayPal checkout process and the WordPress default is HTTP 1.0. So, in production PayPal will be working without a problem, in Sandbox the super helpful empty array error message you’re seeing now.More info on the update is here: https://www.paypal-knowledge.com/infocenter/index?page=content&widgetview=true&id=FAQ1914&viewlocale=en_US
Great, what’s the solution?
We have one, we’re running tests and will have a release up shortly to resolve the issue. I hope within the next few hours.
Thank you for your patience, I’ll update the thread shortly when the release is live.
Take care,
Hey John,
Please run the updater to grab LifterLMS 2.0.5 which resolves the aforementioned PayPal sandbox issue.
Have a great day and thanks for your patience!
Hi Thomas,
Many many thanks. That is what I call a speedy response. I’ll do the update now and get on with my testing.
Thanks once again,
John
Hi,
Sorry but there is still an error.
I updated to 2.0.5
Checked my sandbox api credentials
Enabled paypal and sandbox
Attempted a test purchase and got this error
WP_Error Object
(
[errors] => Array
(
[http_request_failed] => Array
(
[0] => Cannot communicate securely with peer: no common encryption algorithm(s).
))
[error_data] => Array
(
))
I also cleared my browsers memory.
Perhaps you could have another look.
Many thanks,
John
Hey John,
I’m not able to recreate this issue either locally (on my local testing server(s)) or on our live sandbox testing servers. I tried several different installations to test different server setups and configurations.
I’m doing a bit of research to determine what this issue is caused by — as it’s a WP Error, the error is being returned by the wp_remote_post() and — I think — has to do with your servers inability to communicate with the PayPal servers, but I’m not 100% positive.
I’ve found a few things on stack overflow that point to potential solutions to help find the source of the problem and then I’m sure resolve it once we determine what’s actually happening.
This seems promising as wp_remote_post() will utilize curl if available: https://stackoverflow.com/a/31108631/400568
I’ve seen a few things that suggest using “http” rather than “https” to avoid this error but after testing that PayPal rejects the request entirely so it won’t resolve the issue.
I cannot find anything that connect this error directly to PayPal (or WordPress for that matter).
My best assumption is that it has to do with server configurations of curl.
Would you mind sharing the hosting platform your on and — if possible — checking with your host to determine if the issue is related to hosting settings? I can do some more digging specific to your host to see if it’s possibly a known issue specific to your server.
Thanks,
Thanks Thomas,
That’s interesting (not that I understand much of it!).
I have a VPS hosted with a company called ezpzhosting.co.uk. I have the VPS-2048 package on this page https://www.ezpzhosting.co.uk/vps.html
Here is my phpinfo file https://arooneytraining.co.uk/phpinfo.php
Hope that helps, I can always drop a line to my support chaps with any questions.
Many thanks once again,
John
Hey John,
I by no means understand it all either… however, I can read this stuff pretty well and, if I had to guess, I think SO article identifies the problem we’re experiencing here… I hope at least because that means there’s a solution.
Here’s my thoughts:
The SO solution identifies that CURL is built with a bug — the bugzilla report for redhat linked to from the post identifies that this is fixed in NSS 3.20. According to your PHP server output, your SSL Version is NSS/3.15.4 — my server that’s working is NSS/3.20.0 Basic ECC.
I’m guessing your server may be missing the ECC ciphers and causing the security issue.
I can’t find anything specific to your host with this issue but I do see your host includes server setup and management so it shouldn’t cost you any extra to ring their support up and see if they can help identify if my findings (guesses) are accurate or close to it.
It still may be entirely possible that we have an issue here in the codebase but since I can’t replicate it, I’m hoping your server can update your curl build and get you rolling again. Perhaps it’s not that but maybe they’ll be able to help identify the cause of the issue if I’m off.
Thanks and keep me posted,
Hi Thomas,
I’ve passed all this on to my hosting support team. It’s all done via support tickets but I will update this thread once I have had a reply. They are usually very good and very helpful but they can take a while sometimes.
John
Hi Thomas,
Further to this I have just read a post on PaidMemberships Pro’s website https://www.paidmembershipspro.com/paypals-tls-1-2-http1-1-upgrade-impact-membership-site/
In particular the sentence
“Verify Support for TLS 1.2 and HTTP/1.1 With Your WebhostTo avoid disruption in service, you must first verify if your web server supports these security protocols. Contact your web host and find out if your server supports TLS 1.2 and HTTP/1.1. If the answer is no, you will need to work with your web host to enable support. In general, the host only needs to “upgrade OpenSSL to the latest stable version”.
It also goes on to tell of a code snippet to apply in WordPress itself.
I’ve also sent this info to my host.
I hope that makes things clearer
John
Hi Thomas
I have resolved this. The PMPro post pointed me in the right direction. I added
/*
Update the SSLVERSION for CURL to support PayPal Express moving to TLS 1.2More info: https://devblog.paypal.com/upcoming-security-changes-notice/
Your server will need to be updated to a supported version of OpenSSL for this to work.
Add this code to your active theme’s functions.php or a custom plugin.
*/
function my_http_api_curl($handle) {
curl_setopt( $handle, CURLOPT_SSLVERSION, 6 );
}
add_action(‘http_api_curl’, ‘my_http_api_curl’);to my childthemes function.php file and it then worked taking a test payment from paypals sandbox. So the server must be OK with it’s version of cURL to explicitly use the TLS 1.2 protocol
Solved!
Many thanks for all your help
John
Great to hear it John.
I’m going to look a little deeper into this and see if there’s something we can do on our end to resolve this automatically in the future.
I’m also going to mark this thread as resolved, please open a new thread if you need anything else.
Take care,
- The topic ‘PayPal Integration’ is closed to new replies.