I am trying to integrate paypal into a web application and I've not been successful. I have tried loads of things but I keep coming back to one particular error. I am now trying to use the paypal integration wizard, and when I get the code that is provided, I get an error that says: The request was aborted: Could not create SSL/TLS secure channel.
This is the code:
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());
The error occurs on the last line, on the objRequest.GetRequestStream()
I tried looking it up on google but I didn't find anything that worked for me. Does anybody know what I can do to fix this?