1

Sometimes my client is getting an error during the payment process:

The request was aborted: Could not create SSL/TLS secure channel.

Authorize.NET has been used for the payment system. .Net 4.0 Framework is being used. This error is occurring sometimes, why?

John Conde
  • 217,595
  • 99
  • 455
  • 496
  • Welcome to Stack Overflow, it would be great if you could add some information in order for us to solve your problem. Like logs or the code where the error occurs. – Hans Koch Nov 09 '17 at 10:19
  • 2
    Only sometimes? Authorize.Net has recently turned off SSL and older versions of TLS. You need to bump the framework up to 4.5 and set ServiceManager to use TLS12. – Crowcoder Nov 09 '17 at 10:25

2 Answers2

2

Please try this suggested answer on github to https://github.com/AuthorizeNet/sdk-dotnet/issues/203:

using System.Security.Authentication;
using System.Net

// Prior to your web request ...
          const SslProtocols _Tls12 = (SslProtocols)0x00000C00;
          const SecurityProtocolType Tls12 = (SecurityProtocolType)_Tls12;
          ServicePointManager.SecurityProtocol = Tls12;

(Comment by NexWeb.)

dbc
  • 104,963
  • 20
  • 228
  • 340
Andrew Gale
  • 101
  • 1
  • 4
  • I edited the answer to include an excerpt from the github page. [Answers that are little more than a link may be deleted](https://stackoverflow.com/help/deleted-answers). – dbc Mar 11 '19 at 20:37
0

This is happening due to invalid version of .NET Braintree SDK.

You need to update the .NET Braintree SDK you're using to at least version 3.1.0, the minimum version that supports TLS 1.2. Once complete, you can validate your setup using the steps here.

Also, you need to update the .net version from 4.0 to 4.5

For more information, check this link.

hasnayn
  • 356
  • 4
  • 22