Stripe integration error after payment URL error 35: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

I have setup all for integrate Stripe (SSL,curl module installed ,openssl module insalled, webhook at stripe configured and so on)
In the real payment test i have created this s2Member-Pro-Stripe-Form for pay to get custom capability in the user.

[s2Member-Pro-Stripe-Form level="*" ccaps=“talleri” desc=“test” cc=“EUR” custom=“escuela_com” ra=“0.50” rp=“1” rt=“L” rr=“BN” coupon="" accept_coupons=“0” default_country_code=“US” captcha=“0” /]

After the REAL payment with loged testuser, i get a success message in S2member (your username has been updated)

But the custom capability not has been set to the user but the server receive the hook from stripe and no error has been registered at stripe

I have tested using s2-server-scanner.php and i get “### ![Error][ERROR] cURL Extension / Or fopen() URL …”

I have allow_url_fopen = on in php configuration

When i use cURL whitout force tls , it use tlsv1.0 and i get the same error at server ( error 35: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol)

When i use cURL with tlsv1.3 forced in my server it works look this:

[root@escuela ~]# curl --tlsv1.3 https___escuelacom --verbose

  • Rebuilt URL to: https__escuela__com/
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed

    0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0* Trying 127.0.1.1…

  • TCP_NODELAY set

  • Connected to escuela.com (127.0.1.1) port 443 (#0)

  • OpenSSL was built without TLS 1.3 support

  • Curl_http_done: called premature == 0

    0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0

  • Closing connection 0
    curl: (4) OpenSSL was built without TLS 1.3 support

=========================

Looking the s2-https-api-debug.log i can see this message

LOG ENTRY: Tue Sep 17th, 2019 @ precisely 3:22 pm UTC
PHP v7.0.30-0+deb9u1 :: WordPress v5.2.3 :: s2Member v190822 :: s2Member Pro v190822
Memory 11.60 MB :: Real Memory 10.00 MB :: Peak Memory 11.96 MB :: Real Peak Memory 10.00 MB
escuela_com/testpay/
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Array
(
[state] => response
[transport_class] => Requests
[args] => Array
(
[method] => POST
[timeout] => 20
[redirection] => 5
[httpversion] => 1.1
[user-agent] => s2Member v190822; httpsxxxxescuela_com
[reject_unsafe_urls] =>
[blocking] => 1
[headers] => Array
(
)

        [cookies] => Array
            (
            )

        [body] => Array
            (
                [txn_type] => web_accept
                [txn_cid] => cus_FpNGuDLGAYie7m
                [txn_id] => ch_1FJiVjA2vOmIv6btHRnpa2u4
                [custom] => escuela.com
                [mc_gross] => 0.50
                [mc_currency] => EUR
                [tax] => 0.00
                [payer_email] => test@test.com
                [first_name] => quant
                [last_name] => quant
                [option_name1] => Referencing Customer ID
                [option_selection1] => 222
                [option_name2] => Customer IP Address
                [option_selection2] => xx.xx.xxx.xxx
                [item_name] => test
                [item_number] => *:talleri
                [s2member_paypal_proxy] => stripe
                [s2member_paypal_proxy_use] => pro-emails
                [s2member_paypal_proxy_coupon] => Array
                    (
                        [coupon_code] => 
                        [full_coupon_code] => 
                        [affiliate_id] => 
                    )

                [s2member_paypal_proxy_verification] => 038909385258b5bd85de73de02357e7b
                [s2member_paypal_proxy_return_url] => 
            )

        [compress] => 
        [decompress] => 1
        [sslverify] => 
        [sslcertificates] => /home/escuela/public_html/wp-includes/certificates/ca-bundle.crt
        [stream] => 
        [filename] => 
        [limit_response_size] => 
        [s2member] => 190822
        [_redirection] => 5
    )

[url] => https___escuela_com/?s2member_paypal_notify=1
[response] => WP_Error Object
    (
        [errors] => Array
            (
                [http_request_failed] => Array
                    (
                        [0] => cURL error 35: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
                    )

            )

        [error_data] => Array
            (
            )

    )

Please help i cant locate the problem.

the url has been masked not is real.

I´m alone with this error.
Inexistent support in s2menber that leave users alone, but is a good software with a lot of tricks and useful functionalities
¿There is No option to have paid support? please consider to create a paid support forum or service.

Here is the solution that works for me:
https://wordpress.org/support/topic/curl-error-35-error140770fcssl-routinesssl23_get_server_hellounknown-protoc/

As explained in French here , OVH installs SSL certificates on the load balancer, while an intra-site request remains local and thus bypasses the certificate.

If you force HTTPS on your website, you can use the [website:443] trick.

I put that in my child theme functions.php :
Also you can add this in your theme fonction to force CRON SSL/HTTPS:

function force_cron_ssl($url) {
	if ( $url == "https://yoursite/blog/wp-cron.php" ) {
		$url = "http://yoursite:443/blog/wp-cron.php";
	}
	return $url;
}
add_filter( 'site_url', 'force_cron_ssl' );

Hi Roberto.

Thanks for the udpate!

Right, I haven’t seen others mention this problem at all. Not really a plugin issue, but a server/network setup thing, from what I see.

I’m sorry I didn’t see it before, but I probably would have also just done a google search for that error and come up with the same suggested solution you found.

Thank you very much for sharing it for someone in the future that may face the same message.

:slight_smile: