jxycms
5/24/2017 - 11:27 PM

SecurityProtocol for eway sandbox

SecurityProtocol for eway sandbox

in GatewayProvider.cs in private ProcessPaymentResponse ProcessPayment(ProcessPaymentRequest request)


SecurityProtocolType temp = System.Net.ServicePointManager.SecurityProtocol;
if (!isLive)
{
    System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
}

using (StreamWriter streamOut = new StreamWriter(webRequest.GetRequestStream(), System.Text.Encoding.ASCII))
    streamOut.Write(json);(already in the method)

if (!isLive)
{
    System.Net.ServicePointManager.SecurityProtocol = temp;
}