根据这个paypal 文件,在我们使用 IPN 将消息发回 Paypal 之后,我们会返回:-
PayPal will then send one single-word message, VERIFIED, if the message is valid; otherwise, it will send another single-word message, INVALID.
但是,我时不时注意到即使付款成功,响应也可能是空白的。有没有其他人注意到这一点?
我要验证的代码是:-
var req = (HttpWebRequest)WebRequest.Create(Settings.PayPalPaymentUrl);
//Set values for the request back
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
byte[] param = Request.BinaryRead(Request.ContentLength);
strRequest = Encoding.ASCII.GetString(param);
strRequest += "&cmd=_notify-validate";
req.ContentLength = strRequest.Length;
//Send the request to PayPal and get the response
var streamOut = new StreamWriter(req.GetRequestStream(), Encoding.ASCII);
streamOut.Write(strRequest);
streamOut.Close();
var streamIn = new StreamReader(req.GetResponse().GetResponseStream());
strResponse = streamIn.ReadToEnd();
streamIn.Close();
我收到了 99% 的案例,VERIFIED
但我们时不时地看到一条空消息。