Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am getting this exception "The request was aborted: Could not create SSL/TLS secure channel." at the time of ExpressCheckout at following line.
pp_response = (SetExpressCheckoutResponseType)caller.Call("SetExpressCheckout", pp_request);
using in the paypal sandbox Environment in version 53.0

Is anybody there who have any idea how to resolve it? Please Share with me.

Thanks
Posted

Never, ever, accept code from a insecure website to handle anything to do with real money.
You do not know who is giving you the code, you do not know what it does, you do not know that it places the monies correctly into the appropriate account, without passing the details to any third parties.

Only get such code from Paypal themselves - the scope for fraud otherwise is far too large. And remember, you personally could be liable for any monies lost if your action is seen to be negligent - which getting your code from a public forum would most certainly be!
 
Share this answer
 
I was also facing the same problem. Later i come to know after lots of analysis that Paypal has upgraded its TLS protocols(as per Link ).

Now for .NET 4.5 and higher, we can set the http webrequest protocol to TLS 1.2 to higher but .NET 4 or lower doesn't support TLS above TLS1. Hence the fix is directly assign the port for TLS1.2

C#
ServicePointManager.Expect100Continue = true;
              ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
              ServicePointManager.DefaultConnectionLimit = 9999;

              OAuthTokenCredential tokenCredential = new OAuthTokenCredential(ConfigurationManager.AppSettings["PayPalClientID"].ToString(), ConfigurationManager.AppSettings["PayPalClientSecret"].ToString());
              string accessToken = tokenCredential.GetAccessToken();
 
Share this answer
 
Comments
gus169 3-Aug-17 15:26pm    
Solution 2 does not work when the binaries are ran on a machine with .Net 3.5.1 (ie. Win 7 SP1 unpatched). I believe on my development machine the 4.5 framework has TLS 1.2 plumbing and eliminating the 3.5 framework.
Er. Puneet Goel 8-Aug-17 5:52am    
have you checked the details from the reference link ? That could provide you more depth knowledge.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900