I recently added SSL certificates to my site and now my PayPal IPN listener no longer works. It had been working for better than a year without issue.
// Postback to either Sandbox or Live.
string strPayPal = "https://www.paypal.com/cgi-bin/webscr";
BasicCrudToolkit.LogMessage("PayPal Webrequest created", "PayPal Listener");
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(strSandbox);
// Set values for request back.
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
Byte[] param = Request.BinaryRead(HttpContext.Current.Request.ContentLength);
string strRequest = Encoding.ASCII.GetString(param);
BasicCrudToolkit.LogMessage("Request parameters: " + strRequest, "PayPal Listener");
strRequest += "&cmd=_notify-validate";
req.ContentLength = strRequest.Length;
// Send request to PayPal and get request.
StreamWriter streamOut = new StreamWriter(req.GetRequestStream(), Encoding.ASCII);
streamOut.Write(strRequest);
streamOut.Close();
StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream());
string strResponse = streamIn.ReadToEnd();
streamIn.Close();
When I check my IPN History on PayPal I get NOTHING showing up in the HTTP Response Code and the IPN shows in perpetual retry. However when I check my traffic on Azure I see that the site is returning a 302.
As you can see I have a log file that makes entries as the IPN executes. I don't get any entries in the log file. It is almost like Azure is rejecting the IPN request from PayPal before the Listener can even run. Is there some setting on Azure I'm missing here after I got the SSL cert running?
I'm somewhat at the end of my technical expertise and I'd like some advice on where to go debug next.