Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6844233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:21:03+00:00 2026-05-27T00:21:03+00:00

I will try to get straight to the point. I am currently working with

  • 0

I will try to get straight to the point. I am currently working with PayPal IPN and have never seen this issue before. I have used PayPal IPN and my implementations have always been the same. This time however it is producing some very weird results.

I am currently hosted with WinHost.com

Code Used:

public void MakeHttpPost()
    {

        ErrorLog log = new ErrorLog();
        //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 = HttpContext.Current.Request.BinaryRead(HttpContext.Current.Request.ContentLength);
        string strRequest = Encoding.ASCII.GetString(param);
        strRequest += "&cmd=_notify-validate";
        req.ContentLength = strRequest.Length;

        //for proxy
        //WebProxy proxy = new WebProxy(new Uri("http://url:port#"));
        //req.Proxy = proxy;

        //Send the request to PayPal and get the response
        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();
        log.error = strResponse;
        log.Insert();

        if (strResponse == "VERIFIED")
        {
            PaypalPaymentHistory PPH = new PaypalPaymentHistory();

            PPH.LastName = HttpContext.Current.Request["last_name"];
            PPH.FirstName = HttpContext.Current.Request["first_name"];
            PPH.State = HttpContext.Current.Request["address_state"];
            PPH.Zipcode = HttpContext.Current.Request["address_zip"];
            PPH.Address = HttpContext.Current.Request["address_street"];
            PPH.UserName = HttpContext.Current.Request["option_name2"];
            PPH.PaymentStatus = HttpContext.Current.Request["payment_status"];
            PPH.SelectedPackage = HttpContext.Current.Request["option_selection1"];
            PPH.PayerStatus = HttpContext.Current.Request["payer_status"];
            PPH.PaymentType = HttpContext.Current.Request["payment_type"];
            PPH.PayerEmail = HttpContext.Current.Request["payer_email"];
            PPH.ReceiverId = HttpContext.Current.Request["receiver_id"];
            PPH.TxnType = HttpContext.Current.Request["txn_type"];
            PPH.PaymentGross = HttpContext.Current.Request["payment_gross"];

            PPH.Insert();

        }
        else if (strResponse == "INVALID")
        {
            //log for manual investigation
        }
        else
        {
            //log response/ipn data for manual investigation
        }

    }

The idea here is that I will check the status of the order and then insert or not insert the record to the database but this code is still in tests so nothing is official.

The problem I am having is that when I run through sandbox and make a payment via my site paypal sends out the IPN request. The entry gets thrown into the database and all the data is sent back correctly however PayPal is showing that the IPN Post “Failed” and is always stuck on “Retrying”. However I am getting “VERIFIED” back in strResponse. This in turn is causing up to 8 records per transaction. The error that paypal is reporting is 500 – Internal Server Error. Any help would be insanely appreciated as this has been a 2 day head bashing marathon up to this point!

Thanks for any help or resolutions!

P.S I have read nearly every IPN question on stackoverflow and have seen nothing like this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:21:04+00:00Added an answer on May 27, 2026 at 12:21 am

    Your controller action is failing if PayPal reports a 500. You need to debug that code and see what is failing. If your controller does not send a 200 back, PayPal will keep trying.

    I always do this:

        public ActionResult IPN()
        {     
            //try catch log all my payment info
    
            //always return blank page so paypal gets a HTTP 200
            return View();
        }
    

    //you may know this, but for others, here is an example process flow

    1. Payment/transaction made to PayPal
    2. IPN address is configured for PayPal transaction then posts to the IPN address ie: http://yourdomain.com/IPN.aspx
    3. IPN.aspx handles the IPN post and writes PaypalPaymentHistory to db.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know i will get this exception when i try to modify or remove
I will try to keep this as simple as possible. I have a rather
Ok, let's try to get this straight: my final intent is to provide a
I will try to make this as straight forward as possible. This question does
I have been working three days straight to try and integrate ads into my
I will try to be as clear as possible because I can't get anybody
Quite often I will try and run a PHP script and just get a
I will try to make this as clear as I can, but if you
I have an issue with my ExternalInterface. The way it is currently set up
Okay, I'll try to make this as straight forward as possible. I'm using VB.Net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.