String strTransactionID = Request.QueryString["tx"].ToString();
string sOut = "";
string MyIDToken = "MyIdentityToken";
string transactionID = Request.QueryString["tx"].ToString();
string sCmd = "_notify-synch";
string serverURL = "https: //www. paypal. com/cgi-bin/webscr";
try
{
string strFormValues = Request.Form.ToString();
string strPassValue;
string strResponse;
// Create the request back
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(serverURL);
// Set values for the request back
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
//Append the transaction ID, ID Token, and command
//to the form
strPassValue = strFormValues + "&cmd = _notify-synch&at = " + MyIDToken + "&tx = " + transactionID;
req.ContentLength = strPassValue.Length;
// Write the request back IPN strings
StreamWriter stOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);
stOut.Write(strPassValue);
stOut.Close();
// Do the request to PayPal and get the response
StreamReader stIn = new StreamReader(req.GetResponse().GetResponseStream());
strResponse = stIn.ReadToEnd();
stIn.Close();
sOut = Server.UrlDecode(strResponse);
}
catch (Exception x)
{
}
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE