我正在使用NopCommerce的PayPalStandard插件.当我在paypal成功付款后下订单并使用paypalstandard插件付款时,它会重定向到商家网站.那时它给出了错误:
请求已中止:无法创建SSL/TLS安全通道.
我也使用Paypal的Sandbox帐户进行测试.
它从这一行抛出错误:
var sw = new StreamWriter(req.GetRequestStream()
Run Code Online (Sandbox Code Playgroud)
这是下面的代码:
var req = (HttpWebRequest)WebRequest.Create(GetPaypalUrl());
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
req.ProtocolVersion = HttpVersion.Version10;
string formContent = string.Format("cmd=_notify-synch&at={0}&tx={1}", _paypalStandardPaymentSettings.PdtToken, tx);
req.ContentLength = formContent.Length;
using (var sw = new StreamWriter(req.GetRequestStream(), Encoding.ASCII))
sw.Write(formContent);
Run Code Online (Sandbox Code Playgroud)