我将努力直截了当。 我目前正在与Pal IPN合作,从未看到过这一问题。 我一直使用Pal IPN,我的执行也一样。 然而,此时此刻,它正在产生一些非常令人厌恶的结果。
我现在与温·霍斯特·科一起接待我。
法典使用:
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
}
}
这里的想法是,我将检查订单状况,然后在数据库中插入或不添加记录,但该守则仍在测试之中,因此没有正式。
我面临的问题是,当我通过沙箱跑,并通过我的现场支付钱款时,我会发出尼共(毛主义)的请求。 输入数据库后,所有数据都正确退回。 然而,Pal正在表明尼共(毛主义)邮政“失败”,总是被困在“再造”。 然而,我正在恢复“VERIFIED”。 这反过来又导致每笔交易有8个记录。 报到的错误是500个——内部服务器Error。 任何帮助都会得到冷静的赞赏,因为迄今为止,这一直是朝 mar的2天头!
感谢任何帮助或决议。
P.S 我几乎读过每一个尼共(毛主义)问题,并看不到这一点。