Classic ASP & PayPal's ASP

Hello,

I'm wondering if someone can help me put together a little code.  I'm a Classic ASP Programmer, and I need some help to fill in the blanks (...) of the following code:

Any help would be greatly appreciated.
If ... Then 'Payment has been received successfully and is in my PP
	Session("Payer_Name") = ... 'First & Last Name
	Session("Payer_EMail") = ...
	Session("Sellers_TransID") = ... 'the same number as within the confirmation e-mail at the top-right corner
Else
	Response.Redirect("test.asp")
End If
Response.Write(Session("Payer_Name") & "<br>")
Response.Write(Session("Payer_EMail") & "<br>")
Response.Write(Session("Sellers_TransID") & "<br>")

Open in new window

APD TorontoSoftware DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Alpha AuCommented:
where does the data come from? a textbox? or else?

if they are from textbox, you can use request.from("textboxname")
0
Alpha AuCommented:
sorry for the typo, it should be
request.form("textboxname")
0
SvenTech Lead Web-DevelopmentCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
APD TorontoSoftware DeveloperAuthor Commented:
I have looked over PP's site 10 times, but I feel tha there is either a problem with  GoDaddy's Windows Shared Hosting (IIS7),  or with the first couple of lines of my code:
I've read http://developer.paypal-portal.com/pdn/board/message?board.id=ipn&message.id=12284&query.id=556338#M12284 , and my code is below, but I still get a "INVALID"  Can anyone help?

<%@LANGUAGE="VBScript"%>
<%
Dim Item_name, Item_number, Payment_status, Payment_amount
Dim Txn_id, Receiver_email, Payer_email
Dim objHttp, str
 
' read post from PayPal system and add 'cmd'
str = Request.Form & "&cmd=_notify-validate"
 
' post back to PayPal system to validate
' set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
' set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0")
set objHttp = Server.CreateObject("Microsoft.XMLHTTP")
objHttp.open "POST", "https://www.paypal.com/cgi-bin/webscr", false
objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
objHttp.Send str
 
' assign posted variables to local variables
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")
 
' Check notification validation
if (objHttp.status <> 200 ) then
' HTTP error handling
elseif (objHttp.responseText = "VERIFIED") then
	Response.Write("VERIFIED")
' check that Payment_status=Completed
' check that Txn_id has not been previously processed
' check that Receiver_email is your Primary PayPal email
' check that Payment_amount/Payment_currency are correct
' process payment
elseif (objHttp.responseText = "INVALID") then
Response.Write("INVALID")
' log for manual investigation
else
Response.Write("ERROR")
' error
end if
set objHttp = nothing
%>

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
E-Commerce

From novice to tech pro — start learning today.