Note that there are some explanatory texts on larger screens.

plurals
  1. POPaypal response not coming on the notify_url page in Paypal IPN
    text
    copied!<p>I am trying to test my paypal application and specified my paypal notify_url as www.xx.com/paypal.aspx. I should be getting response from the sandbox paypal. But I am not getting anything on the paypal.aspx page. My repsonse processing code is:</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { string connStr = ConfigurationManager.ConnectionStrings["MainConnStr"].ConnectionString; con = new SqlConnection(connStr); con.Open(); //Post back to either sandbox or live string strSandbox = "https://www.sandbox.paypal.com/cgi-bin/webscr"; // string strLive = "https://www.paypal.com/cgi-bin/webscr"; HttpWebRequest req = (HttpWebRequest)WebRequest.Create(strSandbox); //Set values for the 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); strRequest += "&amp;cmd=_notify-validate"; req.ContentLength = strRequest.Length; StreamWriter streamOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII); streamOut.Write(strRequest); streamOut.Close(); StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream()); string strResponse = streamIn.ReadToEnd(); streamIn.Close(); if (strResponse == "VERIFIED") { //Insert statement } else if (strResponse == "INVALID") { //UPDATE YOUR DATABASE StreamWriter swr = new StreamWriter(Server.MapPath("Textfile.txt")); swr.WriteLine("---- not verified(" + DateTime.Now.ToString() + ")--"); swr.Dispose(); } else { //UPDATE YOUR DATABASE //TextWriter txWriter = new StreamWriter(Server.MapPath("../uploads/") + Session["orderID"].ToString() + ".txt"); //txWriter.WriteLine("Invalid"); ////log response/ipn data for manual investigation //txWriter.Close(); } </code></pre> <p>The payment is processed fully. I am also directed to the thank you page. Please HELP</p> <p>Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload