7

I was testing the paypal API for a website I'm making. Everything was working fine last night, but when I ran it again today, I received the following error:

Could not establish secure channel for SSL/TLS with authority 'api-aa.sandbox.paypal.com'

Cœur
  • 37,241
  • 25
  • 195
  • 267
Solid1Snake1
  • 272
  • 1
  • 6
  • 22

2 Answers2

11

Had the same. Try to use http://api-3t.sandbox.paypal.com/ instead. It helped me. I found it here: setExpressCheckout and SSL/TLS error

If you don't have or are not using an API certificate, you should connect to api-3t.paypal.com or api-3t.sandbox.paypal.com for Live or Sandbox respectively.

Community
  • 1
  • 1
Paul
  • 126
  • 1
  • 2
  • 2
    I called up paypal and they let me know that their latest API had errors in them. wherever it said api.sandbox.paypal.com or api-aa-.sandbox.paypa.com Needs to be switched to read: api-3t.sandbox.paypal.com or api-aa-3t.sandbox.paypa.com So you were pretty much correct, thank you very much. – Solid1Snake1 Nov 09 '12 at 01:03
2

I have been battling this same issue for several hours now; After writing the PayPal Express checkout integration using the SOAP API with Signing over year ago it was put on the back burner (all unit test passing at the time). I come back to it today to the error:

Could not establish secure channel for SSL/TLS with authority 'api-3t.sandbox.paypal.com'

After much research I have isolated the issue in our instance being down to the default ServicePointManager.SecurityProtocol value being System.Net.SecurityProtocolType.Ssl3 | System.Net.SecurityProtocolType.Tls, updating this to SecurityProtocolType.Tls12 fixed the issue.

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
Anth12
  • 1,869
  • 2
  • 20
  • 39