I'm using this library on my local computer to develop sandbox payments. I was unable to proceed with the request made to payment api. To be more precise , in TwoCheckoutUtil, Request method Request.GetResponseStream was causing an exception with inner exception : "authentication failed because the remote party has closed the transport stream". For development purposes I'm using .NET WebAPI server with self signed certificate on my machine. To resolve this issue I had to ammend this code at the beginning of the Request method:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
I'm using this library on my local computer to develop sandbox payments. I was unable to proceed with the request made to payment api. To be more precise , in TwoCheckoutUtil, Request method Request.GetResponseStream was causing an exception with inner exception : "authentication failed because the remote party has closed the transport stream". For development purposes I'm using .NET WebAPI server with self signed certificate on my machine. To resolve this issue I had to ammend this code at the beginning of the Request method:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;