ORIGID missing c#
horrorhound
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Oct-28-2016
07:34 AM
I'm at a loss, I'm just trying to obtain transaction details for ANY PPREF and PayPal is always returning "RESULT=7" "ORIGID missing" but ORIGID is included in my request message and I'm using valid "Transaction IDs" which I copy and past from my history from paypal website.
try { // PayPal Payments Advanced: USING Hosted Pages ///////////////// // Create the request. if a token hasn't already been created... HttpWebRequest req = (HttpWebRequest)WebRequest.Create("https://payflowpro.paypal.com"); // Live paypal ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; //Set values for paypal flow post req.Method = "POST"; req.ContentType = "application/x-www-form-urlencoded"; // Build parameter string... System.Text.StringBuilder PayPalRequest = new System.Text.StringBuilder(); PayPalRequest.Append("ORIGID=").Append(txtPPREF.Text).Append("&"); PayPalRequest.Append("TRXTYPE=I").Append("&"); PayPalRequest.Append("TENDER=C").Append("&"); PayPalRequest.Append("PARTNER=PayPal").Append("&"); PayPalRequest.Append("VENDOR=myvendorname").Append("&"); PayPalRequest.Append("USER=myusername").Append("&"); PayPalRequest.Append("PWD=mypassword").Append("&"); PayPalRequest.Append("VERBOSITY=").Append("HIGH"); //Send the request to PayPal and get the response System.IO.StreamWriter streamOut = new System.IO.StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII); streamOut.Write(PayPalRequest.ToString()); streamOut.Close(); System.IO.StreamReader streamIn = new System.IO.StreamReader(req.GetResponse().GetResponseStream()); string strResponse = streamIn.ReadToEnd(); streamIn.Close(); if (strResponse.IndexOf("RESULT=0") > -1) { //Success Console.WriteLine("Paypal Secure Token Request Success: " + strResponse); Console.WriteLine(strResponse.Substring(strResponse.IndexOf("SECURETOKEN=") + 12, (strResponse.IndexOf("&SECURETOKENID") - strResponse.IndexOf("SECURETOKEN=") - 12))); } else { //Failure Console.WriteLine("Paypal Secure Token Request Error: " + strResponse.Trim()); } } catch (Exception ex) { Console.WriteLine(ex.Message); }
0 REPLIES 0

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.