PayPal - The request aborted could not create SSL-TLS connection - Resolved

PayPal - The request aborted could not create SSL-TLS connection - Resolved

To resolve the above issue and the following warning

You must write ContentLength bytes to the request stream before calling [Begin]GetResponse.

Include following

System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

in function

 public string HttpCall(string NvpRequest) //CallNvpServer

The function will look as follows

public string HttpCall(string NvpRequest) //CallNvpServer
        {
            string url = pendpointurl;

            //To Add the credentials from the profile
            string strPost = NvpRequest   "&"   buildCredentialsNVPString();
            strPost = strPost   "&BUTTONSOURCE="   HttpUtility.UrlEncode(BNCode);

            System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

            HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
            objRequest.Timeout = Timeout;
            objRequest.Method = "POST";
            objRequest.ContentLength = strPost.Length;



Contact us for any question on this topic

Search for any Payment Gateway PayPal, CCAvenue, WorldPay, Technology Help

Click here to Contact for any Integration Help

Earn Rs 51 and Help a Needy and more on further referral (INDIA ONLY) I’m inviting you to join Tez, a simple and secure payments app by Google. Here’s my code UG0W9 - just enter it before your first transaction. Once you’ve sent your first payment, we’ll each get ₹51! https://g.co/tez/UG0W9