【发布时间】:2016-04-28 22:51:58
【问题描述】:
我正在使用 NopCommerce 的 PayPalStandard 插件。当我在paypal上成功付款后下订单并使用paypalstandard插件付款时,它会重定向到商家网站。当时它给出了错误:
请求被中止:无法创建 SSL/TLS 安全通道。
我也在使用 Paypal 的 Sandbox 帐户进行测试。
它从这一行抛出错误:
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);
【问题讨论】:
-
大约一天前我开始看到这种情况。 sandbox.paypal.com的证书可能有问题?
-
9-10 个月前它不会在沙盒中引发任何错误。是沙盒的问题吗?
-
此代码也成功地与贝宝帐户一起使用。它仅发生在沙盒帐户中。所以是沙盒账号的问题?
标签: asp.net-mvc paypal paypal-sandbox nopcommerce