title: Do I need a new PayPal API to support TLS 1.2 on .Net server?
body: <p>I am running ASP.Net 4.5, but using a very old version of the PayPal SOAP api. The reference is to paypal_base.dll with a reported version of 4.3.1.0. The code that calls the API has &quot;using&quot; statements that reference:</p>
  <blockquote>
  <p>com.paypal.sdk.services</p>
  <p>com.paypal.soap.api.</p>
  </blockquote>
  <p>I have verified at the point where the call to the PayPal api is made, that this value</p>
  <blockquote>
  <p>System.Net.ServicePointManager.SecurityProtocol</p>
  </blockquote>
  <p>includes both ssl3 and tls1.2.</p>
  <p>I am pointing at the &quot;sandbox&quot; mode.</p>
  <p>But when the setExpressCheckout call is made, I get a runtime exception that says:
  The request was aborted: Could not create SSL/TLS secure channel.</p>
  <p>I have downloaded the PayPal API Samples project and using the same sandbox credentials, it works.  Looking in Fiddler, the calls are nearly identical except the samples API call goes to api-3t.sandbox.paypal.com, while my code goes to api-aa.sandbox.paypal.com, but according to the documentation on TLS 1.2 readyness, both apis should work.  I don't see anywhere in either API to set the endpoint other than switching between &quot;live&quot; and &quot;sandbox&quot;.</p>
  <p>In the fiddler response, both show:
  &quot;A SSLv3-compatible ServerHello handshake was found. Fiddler extracted the parameters below.
  Version: 3.3 (TLS/1.2)&quot;
  And the responses are identical except for the &quot;random&quot; parameter. So the old API call is using TLS 1.2</p>
  <p>My code and the Samples API code are only slightly different, the sample uses:</p>
  <pre><code>        SetExpressCheckoutRequestType request = new SetExpressCheckoutRequestType();
          populateRequestObject(request); //populate request data
          SetExpressCheckoutReq wrapper = new SetExpressCheckoutReq();
          wrapper.SetExpressCheckoutRequest = request;
          Dictionary&lt;string, string&gt; configurationMap = Configuration.GetAcctAndConfig(); //set merchant config
          PayPalAPIInterfaceServiceService service = new PayPalAPIInterfaceServiceService(configurationMap);
          SetExpressCheckoutResponseType setECResponse = service.SetExpressCheckout(wrapper); //make the call
  </code></pre>
  <p>Where my (again, very old code looks like this):</p>
  <pre><code>    CallerServices caller = new CallerServices();
      caller.APIProfile = SetProfile.ApplicationProfile; //set merchant config
      SetExpressCheckoutRequestType pp_request = new SetExpressCheckoutRequestType();
      // Create the request details object
      pp_request.SetExpressCheckoutRequestDetails = new SetExpressCheckoutRequestDetailsType();
      pp_request.SetExpressCheckoutRequestDetails.PaymentAction = paymentAction;
      pp_request.SetExpressCheckoutRequestDetails.PaymentActionSpecified = true;
  
      pp_request.SetExpressCheckoutRequestDetails.OrderTotal = new BasicAmountType();
  
      pp_request.SetExpressCheckoutRequestDetails.OrderTotal.currencyID = currencyCodeType;
      pp_request.SetExpressCheckoutRequestDetails.OrderTotal.Value = paymentAmount;
  
      pp_request.SetExpressCheckoutRequestDetails.CancelURL = cancelURL;
      pp_request.SetExpressCheckoutRequestDetails.ReturnURL = returnURL;
      return (SetExpressCheckoutResponseType) caller.Call(&quot;SetExpressCheckout&quot;, pp_request); //do the call
  </code></pre>
  <p>The sample code works, my code throws the SSL/TLS error.  I tried upgrading to the latest SDK, but so much has changed, it will be quite a  large effort to migrate all that code.</p>
  <p>From fiddler, it seems to be using TLS 1.2 even with the old API, but I get a runtime exception about the SSL/TLS connection.  Is it because of the different endpoint?  Is the old API just too old?</p>
  <p>Thanks in advance for any help - I would love to avoid migrating all that ancient code!.</p>
  <p>EDIT: I should mention I am using the UserName/Password/Signature credentials, not certificate based credentials.</p>