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

  • SEARCH
  • Home
  • 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 7788869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T21:06:53+00:00 2026-06-01T21:06:53+00:00

I am trying to test my paypal application and specified my paypal notify_url as

  • 0

I am trying to test my paypal application and specified my paypal notify_url as http://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:

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 += "&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();
    }

The payment is processed fully. I am also directed to the thank you page. Please HELP

Thanks

  • 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-06-01T21:06:55+00:00Added an answer on June 1, 2026 at 9:06 pm

    First, you have to make sure that the URL you are passing to PayPal as the notify_url value is a publicly valid and resolvable URL. Meaning, make sure you are not sending it an internal network URL or machine name (i.e. localhost, my_computer_name, mypcname.mynetwork.com ). Easy way to check that and make sure you haven’t created a bad name or have an incorrect network configuration, is take whatever URL you are sending to PayPal as the notify_url value, and have a friend that is external to your network try to access the URL in their browser. If they get a connection error, you have to rethink your network configuration or naming before you can get PayPal to see your machine.

    Second, if you are running the above code in Visual Studio using the debugger and build in web server, you might be limited to it only responding to requests if the requested site name is “localhost”. See the following Microsoft article on how to setup your code to run in an actual instance of IIS.

    http://msdn.microsoft.com/en-us/library/58wxa9w5.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to connect to Paypal Sandbox from a new server. If I test
just trying to test for equality in this piece of code, but getting a
I have paypal sandbox test account. I am trying it with HTML form. It
I have created two test accounts(buyer and seller) in PayPal sandbox. And then trying
I am trying to create a paypal sandbox test account using preconfigured account method
I'm trying to test a method I have in my application, but I don't
im trying to test example from developers webpage $token_url = https://graph.facebook.com/oauth/access_token? . client_id= .
I trying to test an AccountController that uses DotNetOpenAuth but I am running into
I'm trying to test some mailers with rspec but deliveries are always empty. Here
I am trying to test a sinatra app using minitest and capybara but get

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.