|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Paypal+ipn and Asp (Urgent)
I am having a payment website which needs to be integrated, i am having the following code which is not working fine. I am having the following script and my notifyurl is not working i don't know why can guys please help me up <% if SIGNUP_PRICE > 0 then %> <form name="_xclick" action="http://www.paypal.com/cgi-bin/webscr" method="post"> <% else %> <form action="admin_paypal_confirmation.asp" method="post"> <% end if %> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value=i***@a.com> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="item_name" value="ADMIN/RE-SELLER Signup Fees"> <input type="hidden" name="item_number" value=1> <input type="hidden" name="amount" value=11> <input type="hidden" name="no_shipping" value="1"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="rm" value="2"> <input type="hidden" name="return" value="http:// mywebsite.com/login.asp?msg=You have Successfully Paid Signup Fee."> <input type="hidden" name="cancel_return" value="http://mywebsite.com/login.asp?msg=You have canceled the Payment Process."> <input type="hidden" name="notify_url" value="http://mywebsite.com/admin_paypal_confirmation.asp"> admin_paypal_confirmation.asp ========================== Dim Item_name, Item_number, Payment_status, Payment_amount Dim Txn_id, Receiver_email, Payer_email Dim objHttp, str str = Request.Form & "&cmd=_notify-validate" set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP") objHttp.open "POST", "https://www.paypal.com/cgi-bin/webscr", false objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded" objHttp.Send str Item_name = Request.Form("item_name") Item_number = Request.Form("item_number") Payment_status = Request.Form("payment_status") Payment_amount = Request.Form("mc_gross") Payment_currency = Request.Form("mc_currency") Txn_id = Request.Form("txn_id") Receiver_email = Request.Form("receiver_email") Payer_email = Request.Form("payer_email") PhysicalPath=server.MapPath("/")&"\mywebsite\testpaypal.txt" dim fs,fname set fs=Server.CreateObject("Scripting.FileSystemObject") set fname=fs.CreateTextFile(PhysicalPath) fname.WriteLine objHttp.status fname.WriteLine objHttp.responseText fname.Close set fname=nothing set fs=nothing if (objHttp.status <> 200 ) then elseif (objHttp.responseText = "VERIFIED") then ABC() 'This function will do the database operations elseif (objHttp.responseText = "INVALID") then else end if set objHttp = nothing In the admin_paypal_confirmation.asp i added a filesystemobject so that i could see whether the data or is this file being called. To my surprise i find that it is not created also.If i run this file alone directly it will create the file.but thru paypal its not creating Any help will be of great use Regards Vinod Your question is a little fuzzy. Are you saying that paypal rejects the
request when you send it through xmlhttp but not when it is a direct post? If so, I would create a test script to call instead of paypal and just log request.form. Then see if it is different between the two methods. Also, is paypal expecting any headers (like http-referer) or cookies? Show quote "Vinod" <vi***@erivasystems.com> wrote in message news:%23GI57tjKFHA.1176@TK2MSFTNGP12.phx.gbl... > Hi > > I am having a payment website which needs to be integrated, i am having > the > following code which is not working fine. > > I am having the following script and my notifyurl is not working i don't > know why can guys please help me up > > <% > if SIGNUP_PRICE > 0 then > %> > <form name="_xclick" > action="http://www.paypal.com/cgi-bin/webscr" method="post"> > <% > else > %> > <form action="admin_paypal_confirmation.asp" method="post"> > > <% > end if > %> > > <input type="hidden" name="cmd" value="_xclick"> > <input type="hidden" name="business" value=i***@a.com> > <input type="hidden" name="currency_code" value="USD"> > <input type="hidden" name="item_name" value="ADMIN/RE-SELLER Signup > Fees"> > <input type="hidden" name="item_number" value=1> > <input type="hidden" name="amount" value=11> > <input type="hidden" name="no_shipping" value="1"> > <input type="hidden" name="no_note" value="1"> > <input type="hidden" name="rm" value="2"> > > <input type="hidden" name="return" value="http:// > mywebsite.com/login.asp?msg=You have Successfully Paid Signup Fee."> > <input type="hidden" name="cancel_return" > value="http://mywebsite.com/login.asp?msg=You have canceled the Payment > Process."> > <input type="hidden" name="notify_url" > value="http://mywebsite.com/admin_paypal_confirmation.asp"> > > > admin_paypal_confirmation.asp > ========================== > Dim Item_name, Item_number, Payment_status, Payment_amount > Dim Txn_id, Receiver_email, Payer_email > Dim objHttp, str > > > str = Request.Form & "&cmd=_notify-validate" > set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP") > objHttp.open "POST", "https://www.paypal.com/cgi-bin/webscr", false > objHttp.setRequestHeader "Content-type", > "application/x-www-form-urlencoded" > objHttp.Send str > > Item_name = Request.Form("item_name") > Item_number = Request.Form("item_number") > Payment_status = Request.Form("payment_status") > Payment_amount = Request.Form("mc_gross") > Payment_currency = Request.Form("mc_currency") > Txn_id = Request.Form("txn_id") > Receiver_email = Request.Form("receiver_email") > Payer_email = Request.Form("payer_email") > > > PhysicalPath=server.MapPath("/")&"\mywebsite\testpaypal.txt" > dim fs,fname > set fs=Server.CreateObject("Scripting.FileSystemObject") > set fname=fs.CreateTextFile(PhysicalPath) > fname.WriteLine objHttp.status > fname.WriteLine objHttp.responseText > fname.Close > set fname=nothing > set fs=nothing > > > if (objHttp.status <> 200 ) then > > elseif (objHttp.responseText = "VERIFIED") then > ABC() > > 'This function will do the database operations > elseif (objHttp.responseText = "INVALID") then > else > end if > set objHttp = nothing > > > In the admin_paypal_confirmation.asp i added a filesystemobject so that i > could see whether the data or is this file being called. > To my surprise i find that it is not created also.If i run this file alone > directly it will create the file.but thru paypal its not creating > > Any help will be of great use > > > Regards > Vinod > > > Hi,
I am saying it not even coming to that page. Regards Vinod Show quote "Mark Schupp" <notva***@email.net> wrote in message news:Ogtgl9jKFHA.3332@TK2MSFTNGP15.phx.gbl... > Your question is a little fuzzy. Are you saying that paypal rejects the > request when you send it through xmlhttp but not when it is a direct post? > > If so, I would create a test script to call instead of paypal and just log > request.form. Then see if it is different between the two methods. > > Also, is paypal expecting any headers (like http-referer) or cookies? > > -- > --Mark Schupp > Head of Development > Integrity eLearning > www.ielearning.com > > "Vinod" <vi***@erivasystems.com> wrote in message > news:%23GI57tjKFHA.1176@TK2MSFTNGP12.phx.gbl... > > Hi > > > > I am having a payment website which needs to be integrated, i am having > > the > > following code which is not working fine. > > > > I am having the following script and my notifyurl is not working i don't > > know why can guys please help me up > > > > <% > > if SIGNUP_PRICE > 0 then > > %> > > <form name="_xclick" > > action="http://www.paypal.com/cgi-bin/webscr" method="post"> > > <% > > else > > %> > > <form action="admin_paypal_confirmation.asp" method="post"> > > > > <% > > end if > > %> > > > > <input type="hidden" name="cmd" value="_xclick"> > > <input type="hidden" name="business" value=i***@a.com> > > <input type="hidden" name="currency_code" value="USD"> > > <input type="hidden" name="item_name" value="ADMIN/RE-SELLER Signup > > Fees"> > > <input type="hidden" name="item_number" value=1> > > <input type="hidden" name="amount" value=11> > > <input type="hidden" name="no_shipping" value="1"> > > <input type="hidden" name="no_note" value="1"> > > <input type="hidden" name="rm" value="2"> > > > > <input type="hidden" name="return" value="http:// > > mywebsite.com/login.asp?msg=You have Successfully Paid Signup Fee."> > > <input type="hidden" name="cancel_return" > > value="http://mywebsite.com/login.asp?msg=You have canceled the Payment > > Process."> > > <input type="hidden" name="notify_url" > > value="http://mywebsite.com/admin_paypal_confirmation.asp"> > > > > > > admin_paypal_confirmation.asp > > ========================== > > Dim Item_name, Item_number, Payment_status, Payment_amount > > Dim Txn_id, Receiver_email, Payer_email > > Dim objHttp, str > > > > > > str = Request.Form & "&cmd=_notify-validate" > > set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP") > > objHttp.open "POST", "https://www.paypal.com/cgi-bin/webscr", false > > objHttp.setRequestHeader "Content-type", > > "application/x-www-form-urlencoded" > > objHttp.Send str > > > > Item_name = Request.Form("item_name") > > Item_number = Request.Form("item_number") > > Payment_status = Request.Form("payment_status") > > Payment_amount = Request.Form("mc_gross") > > Payment_currency = Request.Form("mc_currency") > > Txn_id = Request.Form("txn_id") > > Receiver_email = Request.Form("receiver_email") > > Payer_email = Request.Form("payer_email") > > > > > > PhysicalPath=server.MapPath("/")&"\mywebsite\testpaypal.txt" > > dim fs,fname > > set fs=Server.CreateObject("Scripting.FileSystemObject") > > set fname=fs.CreateTextFile(PhysicalPath) > > fname.WriteLine objHttp.status > > fname.WriteLine objHttp.responseText > > fname.Close > > set fname=nothing > > set fs=nothing > > > > > > if (objHttp.status <> 200 ) then > > > > elseif (objHttp.responseText = "VERIFIED") then > > ABC() > > > > 'This function will do the database operations > > elseif (objHttp.responseText = "INVALID") then > > else > > end if > > set objHttp = nothing > > > > > > In the admin_paypal_confirmation.asp i added a filesystemobject so that i > > could see whether the data or is this file being called. > > To my surprise i find that it is not created also.If i run this file alone > > directly it will create the file.but thru paypal its not creating > > > > Any help will be of great use > > > > > > Regards > > Vinod > > > > > > > > Are you testing against the PayPal Sandbox?
Is your payment transaction completing? Is your return URL being called? Show quote "Vinod" <vi***@erivasystems.com> wrote in message "application/x-www-form-urlencoded"news:%23GI57tjKFHA.1176@TK2MSFTNGP12.phx.gbl... > Hi > > I am having a payment website which needs to be integrated, i am having the > following code which is not working fine. > > I am having the following script and my notifyurl is not working i don't > know why can guys please help me up > > <% > if SIGNUP_PRICE > 0 then > %> > <form name="_xclick" > action="http://www.paypal.com/cgi-bin/webscr" method="post"> > <% > else > %> > <form action="admin_paypal_confirmation.asp" method="post"> > > <% > end if > %> > > <input type="hidden" name="cmd" value="_xclick"> > <input type="hidden" name="business" value=i***@a.com> > <input type="hidden" name="currency_code" value="USD"> > <input type="hidden" name="item_name" value="ADMIN/RE-SELLER Signup > Fees"> > <input type="hidden" name="item_number" value=1> > <input type="hidden" name="amount" value=11> > <input type="hidden" name="no_shipping" value="1"> > <input type="hidden" name="no_note" value="1"> > <input type="hidden" name="rm" value="2"> > > <input type="hidden" name="return" value="http:// > mywebsite.com/login.asp?msg=You have Successfully Paid Signup Fee."> > <input type="hidden" name="cancel_return" > value="http://mywebsite.com/login.asp?msg=You have canceled the Payment > Process."> > <input type="hidden" name="notify_url" > value="http://mywebsite.com/admin_paypal_confirmation.asp"> > > > admin_paypal_confirmation.asp > ========================== > Dim Item_name, Item_number, Payment_status, Payment_amount > Dim Txn_id, Receiver_email, Payer_email > Dim objHttp, str > > > str = Request.Form & "&cmd=_notify-validate" > set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP") > objHttp.open "POST", "https://www.paypal.com/cgi-bin/webscr", false > objHttp.setRequestHeader "Content-type", Show quote > objHttp.Send str > > Item_name = Request.Form("item_name") > Item_number = Request.Form("item_number") > Payment_status = Request.Form("payment_status") > Payment_amount = Request.Form("mc_gross") > Payment_currency = Request.Form("mc_currency") > Txn_id = Request.Form("txn_id") > Receiver_email = Request.Form("receiver_email") > Payer_email = Request.Form("payer_email") > > > PhysicalPath=server.MapPath("/")&"\mywebsite\testpaypal.txt" > dim fs,fname > set fs=Server.CreateObject("Scripting.FileSystemObject") > set fname=fs.CreateTextFile(PhysicalPath) > fname.WriteLine objHttp.status > fname.WriteLine objHttp.responseText > fname.Close > set fname=nothing > set fs=nothing > > > if (objHttp.status <> 200 ) then > > elseif (objHttp.responseText = "VERIFIED") then > ABC() > > 'This function will do the database operations > elseif (objHttp.responseText = "INVALID") then > else > end if > set objHttp = nothing > > > In the admin_paypal_confirmation.asp i added a filesystemobject so that i > could see whether the data or is this file being called. > To my surprise i find that it is not created also.If i run this file alone > directly it will create the file.but thru paypal its not creating > > Any help will be of great use > > > Regards > Vinod > > > I am testing it in live paypal.
My return URL is being called too and my payment transcation is also getting completed. But the path to my notify url has a update statement which should be done in the paypal its not being processed. regards vinod Show quote "Jonathan Dodds" <NO_REPLY> wrote in message news:ek9ZugqKFHA.1620@TK2MSFTNGP14.phx.gbl... > Are you testing against the PayPal Sandbox? > Is your payment transaction completing? > Is your return URL being called? > > "Vinod" <vi***@erivasystems.com> wrote in message > news:%23GI57tjKFHA.1176@TK2MSFTNGP12.phx.gbl... > > Hi > > > > I am having a payment website which needs to be integrated, i am having > the > > following code which is not working fine. > > > > I am having the following script and my notifyurl is not working i don't > > know why can guys please help me up > > > > <% > > if SIGNUP_PRICE > 0 then > > %> > > <form name="_xclick" > > action="http://www.paypal.com/cgi-bin/webscr" method="post"> > > <% > > else > > %> > > <form action="admin_paypal_confirmation.asp" method="post"> > > > > <% > > end if > > %> > > > > <input type="hidden" name="cmd" value="_xclick"> > > <input type="hidden" name="business" value=i***@a.com> > > <input type="hidden" name="currency_code" value="USD"> > > <input type="hidden" name="item_name" value="ADMIN/RE-SELLER Signup > > Fees"> > > <input type="hidden" name="item_number" value=1> > > <input type="hidden" name="amount" value=11> > > <input type="hidden" name="no_shipping" value="1"> > > <input type="hidden" name="no_note" value="1"> > > <input type="hidden" name="rm" value="2"> > > > > <input type="hidden" name="return" value="http:// > > mywebsite.com/login.asp?msg=You have Successfully Paid Signup Fee."> > > <input type="hidden" name="cancel_return" > > value="http://mywebsite.com/login.asp?msg=You have canceled the Payment > > Process."> > > <input type="hidden" name="notify_url" > > value="http://mywebsite.com/admin_paypal_confirmation.asp"> > > > > > > admin_paypal_confirmation.asp > > ========================== > > Dim Item_name, Item_number, Payment_status, Payment_amount > > Dim Txn_id, Receiver_email, Payer_email > > Dim objHttp, str > > > > > > str = Request.Form & "&cmd=_notify-validate" > > set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP") > > objHttp.open "POST", "https://www.paypal.com/cgi-bin/webscr", false > > objHttp.setRequestHeader "Content-type", > "application/x-www-form-urlencoded" > > objHttp.Send str > > > > Item_name = Request.Form("item_name") > > Item_number = Request.Form("item_number") > > Payment_status = Request.Form("payment_status") > > Payment_amount = Request.Form("mc_gross") > > Payment_currency = Request.Form("mc_currency") > > Txn_id = Request.Form("txn_id") > > Receiver_email = Request.Form("receiver_email") > > Payer_email = Request.Form("payer_email") > > > > > > PhysicalPath=server.MapPath("/")&"\mywebsite\testpaypal.txt" > > dim fs,fname > > set fs=Server.CreateObject("Scripting.FileSystemObject") > > set fname=fs.CreateTextFile(PhysicalPath) > > fname.WriteLine objHttp.status > > fname.WriteLine objHttp.responseText > > fname.Close > > set fname=nothing > > set fs=nothing > > > > > > if (objHttp.status <> 200 ) then > > > > elseif (objHttp.responseText = "VERIFIED") then > > ABC() > > > > 'This function will do the database operations > > elseif (objHttp.responseText = "INVALID") then > > else > > end if > > set objHttp = nothing > > > > > > In the admin_paypal_confirmation.asp i added a filesystemobject so that i > > could see whether the data or is this file being called. > > To my surprise i find that it is not created also.If i run this file alone > > directly it will create the file.but thru paypal its not creating > > > > Any help will be of great use > > > > > > Regards > > Vinod > > > > > > > >
http://www.cjwsoft.com/paypal_ipn_fulfill.asp
Show quote
"Vinod" <vi***@erivasystems.com> wrote in message
news:%23GI57tjKFHA.1176@TK2MSFTNGP12.phx.gbl... > Hi > > I am having a payment website which needs to be integrated, i am having > the > following code which is not working fine. > > I am having the following script and my notifyurl is not working i don't > know why can guys please help me up > > <% > if SIGNUP_PRICE > 0 then > %> > <form name="_xclick" > action="http://www.paypal.com/cgi-bin/webscr" method="post"> > <% > else > %> > <form action="admin_paypal_confirmation.asp" method="post"> > > <% > end if > %> > > <input type="hidden" name="cmd" value="_xclick"> > <input type="hidden" name="business" value=i***@a.com> > <input type="hidden" name="currency_code" value="USD"> > <input type="hidden" name="item_name" value="ADMIN/RE-SELLER Signup > Fees"> > <input type="hidden" name="item_number" value=1> > <input type="hidden" name="amount" value=11> > <input type="hidden" name="no_shipping" value="1"> > <input type="hidden" name="no_note" value="1"> > <input type="hidden" name="rm" value="2"> > > <input type="hidden" name="return" value="http:// > mywebsite.com/login.asp?msg=You have Successfully Paid Signup Fee."> > <input type="hidden" name="cancel_return" > value="http://mywebsite.com/login.asp?msg=You have canceled the Payment > Process."> > <input type="hidden" name="notify_url" > value="http://mywebsite.com/admin_paypal_confirmation.asp"> > > > admin_paypal_confirmation.asp > ========================== > Dim Item_name, Item_number, Payment_status, Payment_amount > Dim Txn_id, Receiver_email, Payer_email > Dim objHttp, str > > > str = Request.Form & "&cmd=_notify-validate" > set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP") > objHttp.open "POST", "https://www.paypal.com/cgi-bin/webscr", false > objHttp.setRequestHeader "Content-type", > "application/x-www-form-urlencoded" > objHttp.Send str > > Item_name = Request.Form("item_name") > Item_number = Request.Form("item_number") > Payment_status = Request.Form("payment_status") > Payment_amount = Request.Form("mc_gross") > Payment_currency = Request.Form("mc_currency") > Txn_id = Request.Form("txn_id") > Receiver_email = Request.Form("receiver_email") > Payer_email = Request.Form("payer_email") > > > PhysicalPath=server.MapPath("/")&"\mywebsite\testpaypal.txt" > dim fs,fname > set fs=Server.CreateObject("Scripting.FileSystemObject") > set fname=fs.CreateTextFile(PhysicalPath) > fname.WriteLine objHttp.status > fname.WriteLine objHttp.responseText > fname.Close > set fname=nothing > set fs=nothing > > > if (objHttp.status <> 200 ) then > > elseif (objHttp.responseText = "VERIFIED") then > ABC() > > 'This function will do the database operations > elseif (objHttp.responseText = "INVALID") then > else > end if > set objHttp = nothing > > > In the admin_paypal_confirmation.asp i added a filesystemobject so that i > could see whether the data or is this file being called. > To my surprise i find that it is not created also.If i run this file alone > directly it will create the file.but thru paypal its not creating > > Any help will be of great use > > > Regards > Vinod > > > |
|||||||||||||||||||||||