我正在尝试将 paypal 集成到 Web 应用程序中,但没有成功。我已经尝试了很多东西,但我总是回到一个特定的错误。我现在正在尝试使用 paypal 集成向导,当我获得提供的代码时,我收到一条错误消息:请求已中止:无法创建 SSL/TLS 安全通道。
这是代码:
public string HttpCall(string NvpRequest) //CallNvpServer
{
string url = pendpointurl;
//To Add the credentials from the profile
string strPost = NvpRequest + "&" + buildCredentialsNVPString();
strPost = strPost + "&BUTTONSOURCE=" + HttpUtility.UrlEncode( BNCode );
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Timeout = Timeout;
objRequest.Method = "POST";
objRequest.ContentLength = strPost.Length;
StreamWriter myWriter = new StreamWriter(objRequest.GetRequestStream());
Run Code Online (Sandbox Code Playgroud)
错误发生在最后一行,即 objRequest.GetRequestStream()
我尝试在 google 上查找它,但没有找到任何对我有用的东西。有谁知道我能做些什么来解决这个问题?