2013-03-24 33 views
0

嗨,我試圖安裝貝寶在一個古老的經典ASP網站,但我有問題沙箱測試。 我可以讓我們的衣服被接受,但是我沒有看到我的notify.asp上的任何內容,這應該告訴我,如果銷售是好的或不。我不知道是否用於測試的好住址這個網頁上我的代碼才知道什麼是貝寶的回答狀態:沙箱測試,並沒有收到任何通知

「貝寶驗證

set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP") 

if err.number <> 0 then set objHttp = Server.CreateObject("Microsoft.XMLHTTP") 

str = Request.Form & "&cmd=_notify-validate" 

objHttp.open "POST", "https://www.sandbox.paypal.com/cgi-bin/webscr", false 

objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded" 

objHttp.Send str 

if objHttp.status <> 200 then 
    set objHttp = nothing 
    Response.Redirect "error.asp" 
end if 

ret = objHttp.responseText 
set objHttp = nothing 

' Check notification validation 
if (ret = "VERIFIED") then 
    'paiment is ok i write my databse to confirm and send a email telling ok 
    else 
    'paiment not ok i send a mail telling not ok 
    end if 

哪裏是我的錯誤,因爲我不receieve anymail ... Thx任何幫助。

回答

1

你將不得不啓用即時付款通知

通過將兩個方法

1)在Merchant a/c>個人資料>我的銷售工具>即時付款通知。

2)您還可以設置IPN的網址在每個交易的基礎上,在這種情況下,你不需要把它架在你的個人資料,通過設置

<input type="hidden" name="notify_url" value="http://yoursitename/notify.asp">