Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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'

like image 478
Solid1Snake1 Avatar asked Oct 23 '12 03:10

Solid1Snake1


People also ask

Is PayPal sandbox real money?

In Sandbox mode, the PayPal gateway functions exactly the same as in Live Mode except transactions do not involve real money. To run sandbox mode you'll need a developer account from https://developer.paypal.com.

What is a PayPal Sandbox account?

The PayPal sandbox is a self-contained, virtual testing environment that simulates the live PayPal production environment. The sandbox provides a shielded space where you can initiate and watch while your apps process PayPal API requests without touching any live PayPal accounts.

How do I find my API credentials in PayPal sandbox?

Log in to your sandbox PayPal account. Go to Settings (Gear Icon) > Account Settings > API Access. Select NVP/SOAP API integration (Classic) > Manage API Credentials > Request API Signature. You can find API Username, API Password, and API Signature.


2 Answers

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.

like image 96
Paul Avatar answered Sep 24 '22 08:09

Paul


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;
like image 40
Anth12 Avatar answered Sep 23 '22 08:09

Anth12