Support

Home Forums Event Espresso Premium Paypal Express Setup – not configured properly

Paypal Express Setup – not configured properly

Posted: April 14, 2018 at 10:46 am


SeedrioruWeb

April 14, 2018 at 10:46 am

Hello,

I’m trying to setup Event Espresso on a site with a paypal express gateway.
I keep getting the same error:

“An error has occurred: It appears the Off Site Payment Method was not not configured properly. Please try again or contact <email> for assistance”

I have setup a second website on the same domain as the main site and it also does not work.

I have a demo Event Espresso Site (hosted by Event Espresso). That connects with the Paypal sandbox, no problem. When I copied all the settings and Paypal Sandbox API from demo site to my main site, I cannot get it to work.

I cannot find more details on the error when I look into Event Espresso > Payment Methods > Logs . I don’t know if I should click on the “ID” or “Transaction ID”, but neither of those gives me any sort of error code other than “Error occurred while trying to setup the Express Checkout.”

I belive have a valid SSL certificate on the site. Checked via https://www.digicert.com/

Need to get this working.


SeedrioruWeb

April 14, 2018 at 10:49 am

hosted site is http://www.seedioru.com/web/

Demo site is http://demoee.org/suviharitest2/


Tony

  • Support Staff

April 14, 2018 at 12:27 pm

Hi there,

It sounds like your server can not connect to PayPal but there is a lot of reasons that can happen.

http://www.seedioru.com/web/ doesn’t resolve for me so I can’t view the site?

I cannot find more details on the error when I look into Event Espresso > Payment Methods > Logs . I don’t know if I should click on the “ID” or “Transaction ID”, but neither of those gives me any sort of error code other than “Error occurred while trying to setup the Express Checkout.”

You click on the ID of the log entry, not the Txn ID.

Open up the payment logs and note the highest log entry ID.

Attempt to make just one payment with PayPal Express and it will create multiple entries in the log table. Go through each log entry and look for any errors in those.

‘Error occurred while trying to setup the Express Checkout’ happens when EE tried to connect to payment an create a Payment token but the response from PayPal (or your server) was invalid and no error message/code was returned to display.

Note that if you can’t see any errors you made need to enable WPDebug on the site using this snippet: https://eventespresso.com/wiki/troubleshooting-checklist/#wpdebug

Then repeat the test and check the logs and /wp-content/debug.log for any errors.


SeedrioruWeb

April 14, 2018 at 1:45 pm

The error I’m getting on some of the IDs is:

http_request_failed	
cURL error 35: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure


SeedrioruWeb

April 14, 2018 at 7:24 pm

What does this error mean?
Does it mean that the cURL is using the wrong security level? (SSL3 instead of TLS 1.2?) How do I force it to?

Did some digging, and have tried a few things.

I tried using the code suggested by Josh in this forum thread:
https://eventespresso.com/topic/developer-paypal-com-or-sandbox-paypal-com/
but wordpress will not let me save it into the functions.php

I’ve uploaded plugin called TLS 1.2 Compatibility Checker.
https://en-ca.wordpress.org/plugins/tls-1-2-compatibility-test/
Based on what this says, the site should work with Paypal, despite some older versions of the software.

Our server is a Bluehost ‘shared’ host, so I can’t upgrade the TLS or cURL versions, without upgrading to a much more expensive package.

Could it be something to do with the HTTP postback to Paypal instead of HTTPS? How do I force that?


SeedrioruWeb

April 14, 2018 at 7:53 pm

noticed a typo on the hosted site. It should be http://www.seedrioru.com/web/


Tony

  • Support Staff

April 16, 2018 at 4:09 am

Yeah the problem is you server can not connect to PayPal, or more accurately, PayPal is refusing the connection.

Based on what this says, the site should work with Paypal, despite some older versions of the software.

Regardless of what the plugin shows, you need to update curl to 7.29+ (just install the latest version) and I’d also recommend updating OpenSSL. The reason the CURL notice is in red is it’s an important update, it also sates to make sure you are running OpenSSL 1.0.1 OR X OR Y, which I’m guessing your are not, updating OpenSSL meets that criteria.

If you are unsure on how to update those you can contact your host and have them do it for you.

See: https://unix.stackexchange.com/questions/192944/how-to-fix-curl-sslv3-alert-handshake-failure

Our server is a Bluehost ‘shared’ host, so I can’t upgrade the TLS or cURL versions, without upgrading to a much more expensive package.

So they won’t update the server, or move you to another server that has been updated?

Could it be something to do with the HTTP postback to Paypal instead of HTTPS? How do I force that?

No, it’s a handshake failure, as in the connection is trying to negotiate which TLS version to use and your server and PayPal don’t agree on the correct protocol.


SeedrioruWeb

April 16, 2018 at 6:35 pm

I’ve spoken with the bluehost tech support. e’re on a bluehost shared server, they’ve stated that they cannot upgrade eithWer the TLS, the cURL or the Open SSL.

Since we’re a non-profit organization, we cannot afford to quadruple our web hosting costs, so upgrading to a higher service level is not an option.

I guess I’m stuck with trying to force the cURL to use the 1.2 methods.
The problem I have is when I try to add the code snippet to the theme functions.php file, wordpress won’t let me save it. Why is it doing that?
https://eventespresso.com/topic/developer-paypal-com-or-sandbox-paypal-com/


Tony

  • Support Staff

April 17, 2018 at 1:47 am

I’ve spoken with the bluehost tech support. e’re on a bluehost shared server, they’ve stated that they cannot upgrade eithWer the TLS, the cURL or the Open SSL.

Can’t they move you to another shared server that has been updated? They will have more than one shared server.

Since we’re a non-profit organization, we cannot afford to quadruple our web hosting costs, so upgrading to a higher service level is not an option.

I’m not suggesting you upgrade to higher service level.

I guess I’m stuck with trying to force the cURL to use the 1.2 methods.
The problem I have is when I try to add the code snippet to the theme functions.php file, wordpress won’t let me save it. Why is it doing that?

I don’t have enough info to be able to answer that but at a guess, if you are using the WP editor (which isn’t really recommended) and you are adding all of the code in that snippet shown then you are adding the opening php tag <?php in a file that likely already has an opening PHP tag.

If you are including line 1 when copying the code, try without that line.


SeedrioruWeb

April 17, 2018 at 6:30 pm

I copied the text without the <?php – still did not work.

I then setup the code provided by Josh in the following post
https://github.com/eventespresso/ee-code-snippet-library/blob/master/payment-methods/ee-force-tlsv1-tlsv2-for-paypal.php

I used it to create a functions plugin

I got the following error message when trying to activate the plug-in. I was getting similar errors when trying to put the code (without the ?phpinto the functions.php file

Plugin could not be activated because it triggered a fatal error.

Parse error: syntax error, unexpected 'if' (T_IF) in /home1/seedrior/public_html/web/wp-content/plugins/mycustomization/ee-force-tlsv1-tlsv2-for-paypal.php on line 12


SeedrioruWeb

April 17, 2018 at 6:33 pm

plug-in code:

`<?php
/*
Plugin Name: Site plugin for myexamplesite.com
Description: Site specific code for myexamplesite.com
*/

/**
* Add the following snippet to your theme’s functions.php file or ideally in a site-specific plugin.
* This only affects paypal related payment methods, you can make it site wide by just removing the paypal url condition
*/
ee_force_tls_for_curl($handle, $r, $url) {
if (! $handle ) {
return;
}
if (strstr($url, ‘https://’) && strstr($url, ‘.paypal.com’)) {
if (OPENSSL_VERSION_NUMBER >= 0x1000100f) {
if (! defined(‘CURL_SSLVERSION_TLSv1_2’)) {
// Note the value 6 comes from its position in the enum that
// defines it in cURL’s source code.
define(‘CURL_SSLVERSION_TLSv1_2’, 6); // constant not defined in PHP < 5.5
}
curl_setopt($handle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
} else {
if (! defined(‘CURL_SSLVERSION_TLSv1’)) {
define(‘CURL_SSLVERSION_TLSv1’, 1); // constant not defined in PHP < 5.5
}
curl_setopt($handle, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);
}
}
}
// priority is important here because it will override the code already in ee core for this.
add_action( ‘http_api_curl’, ‘ee_force_tls_for_curl’, 15, 3 );’


Tony

  • Support Staff

April 18, 2018 at 2:38 am

Change this line ee_force_tls_for_curl($handle, $r, $url) {

To this:

function ee_force_tls_for_curl($handle, $r, $url) {

The plugin should then activate for you.

The support post ‘Paypal Express Setup – not configured properly’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Tony 3 months ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!