1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

WooCommerce Paypal not working due to CURL/NSS issues

Discussion in 'Plesk 12.x for Linux' started by Chris1, May 12, 2016.

  1. Chris1

    Chris1 Regular Pleskian

    16
    85%
    Joined:
    Nov 21, 2014
    Messages:
    311
    Likes Received:
    21
    Location:
    Melbourne
    Hello,

    We have a client trying to use the PayPal gateway via WooCommerce in Wordpress but are getting errors upon submitting a shopping cart order.

    The customer is using Plesk provided PHP version.

    A section of the PayPal gateway code which I believe is causing the problem is this:

    Code:
    curl_setopt( $handle, CURLOPT_SSL_CIPHER_LIST, 'TLSv1' );
    Upon submitting a test order, logs show the following error:

    Code:
    WC_Gateway_PPEC_Client::_request: exception is thrown while trying to make a request to PayPal: An error occurred while trying to connect to PayPal: Unknown cipher in list: TLSv1
    It appears that CURL is using NSS instead of OpenSSL, and from reading a number of comments on various websites, specifying the "TLSv1" option above will not work with NSS.

    Is there a way to change it so customers utilize OpenSSL instead of NSS to get around this problem?

    Edit: I get the following error when I comment out that line:

    Code:
    WC_Gateway_PPEC_Client::_request: exception is thrown while trying to make a request to PayPal: An error occurred while trying to connect to PayPal: SSL connect error
     
    Last edited: May 12, 2016
  2. Chris1

    Chris1 Regular Pleskian

    16
    85%
    Joined:
    Nov 21, 2014
    Messages:
    311
    Likes Received:
    21
    Location:
    Melbourne
    It seems that Plesk compile their PHP versions for CURL to work with NSS, whilst CloudLinux compliles their PHP versions for CURL to work with OpenSSL. Does this sound right?
     
Loading...