我正在使用NopCommerce的PayPalStandard插件。当我通过paypal标准插件在Paypal成功付款后下订单&付款时,它会重定向到商家网站。当时它给错误:请求已中止:无法创建SSL/TLS安全通道.System.Net.WebException
The request was aborted: Could not create SSL/TLS secure channel.
而且我使用的测试贝宝的沙盒帐户。
它抛出错误从这一行:
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);
我开始看到这种情况发生在大约一天前。也许与https://www.sandbox.paypal.com/的证书有关的问题? – bustrofedon
9-10个月前,它不会引发任何沙箱错误。是沙箱问题吗? – chitra
此代码也可以成功使用PayPal帐户。它只发生在沙箱帐户。所以这是沙箱帐户的问题? – chitra