我正在使用NopCommerce的PayPalStandard插件。当我通过PayPalStandard插件下订单并进行支付,在成功完成支付后,它会重定向到商家网站。此时,它会出现以下错误:
请求被中止: 无法创建 SSL/TLS 安全通道。
我还在使用Paypal的沙盒账户进行测试。
它会从这一行代码抛出错误:
var sw = new StreamWriter(req.GetRequestStream()
以下是代码:
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);