我試圖設置PayPal Ipn,它在某些訂單驗證上失敗。我發現它失敗如果用戶名稱有一些非標準字母,如&last_name=Montalvo Agüera
我是否需要更改編碼?PayPal驗證失敗,無效
var request = "cmd=_notify-validate&.......";
const string strLive = "https://www.paypal.com/cgi-bin/webscr";
var req = (HttpWebRequest)WebRequest.Create(strLive);
//Set values for the request back
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
req.ContentLength = request.Length;
var streamOut = new StreamWriter(req.GetRequestStream(), Encoding.ASCII);
streamOut.Write(request);
streamOut.Close();
var streamIn = new StreamReader(req.GetResponse().GetResponseStream());
var strResponse = streamIn.ReadToEnd();
streamIn.Close();
Response.Write(strResponse);
不,這不起作用。 – Tomas 2012-01-03 09:07:13
仍然無效。兩天試圖解決問題沒有取得任何成功。我從「即時付款通知(IPN)詳細信息」頁面獲得IPN消息,其中一些失敗。我甚至認爲只是刪除驗證。 – Tomas 2012-01-03 09:17:26
你能編輯這個問題嗎?它有兩個示例請求 - 一個可以工作,一個不可以?可能還有其他問題。 – scraimer 2012-01-03 10:48:15