Solid1Snake1
Solid1Snake1

Reputation: 272

Paypal Sandbox MVC3

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'

Upvotes: 7

Views: 2231

Answers (2)

Anth12
Anth12

Reputation: 1897

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;

Upvotes: 2

Paul
Paul

Reputation: 126

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.

Upvotes: 11

Related Questions