Print Page | Close Window

Paypal IPN? Ohhh err!

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=8136
Printed Date: 01 April 2026 at 8:36am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Paypal IPN? Ohhh err!
Posted By: Gullanian
Subject: Paypal IPN? Ohhh err!
Date Posted: 16 December 2003 at 12:03pm

Ive made a users login area, blah blah.  They can buy some code in the area, one of the options to buy being paypal.  Id like to make it so that they pay, and instantly can download the code from the members area after its been verfified!

Im pretty new to coding with paypal and pretty confused.... What should my paypal form look like and how do I verify a payment?  Any links/code sample would be cool, thanks!




Replies:
Posted By: michael
Date Posted: 16 December 2003 at 1:17pm
Just have them send back to your site after successful payment using some variable for downloading the appropriate code...

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Mart
Date Posted: 16 December 2003 at 1:26pm
But then whats stopping someone from just giving someone else the link where you download the code? I have never used paypal in an app before but there must be a way of authenticating a user.


Posted By: Gullanian
Date Posted: 16 December 2003 at 2:03pm
Yeh I know there is, ive seen it done just cant figure it out or find it anywhere


Posted By: Mart
Date Posted: 16 December 2003 at 2:08pm

You might have seen this:

<%@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
' 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
' log for manual investigation
else
' error
end if
set objHttp = nothing
%>

got it from a sample on the paypal site.



Posted By: MadDog
Date Posted: 16 December 2003 at 2:42pm
There are scripts you can buy that do this.

-------------
http://www.iportalx.net" rel="nofollow">


Posted By: Gullanian
Date Posted: 16 December 2003 at 3:09pm
I like to do things myself


Posted By: MorningZ
Date Posted: 17 December 2003 at 11:20am

https://www.paypal.com/ipn/ - all about IPN

a http://www.eliteweaver.co.uk/testing/ipntest.php - "testbed" to test code against

and as said above.. just follow Paypal's tutorials and any chimp code code for IPN



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Gullanian
Date Posted: 23 December 2003 at 12:05pm
Ok cool, done it thanks, one thing though, the IPN page I set up, is that requested by user or paypal servers, I mean, I have a variable dependant on a cookie value, if the user is sent the IPN page then its cool, but if the paypal server takes it it wont use the users cookies


Posted By: MorningZ
Date Posted: 23 December 2003 at 12:36pm

Paypal's site will not read the user's sessions or cookies...

ALL information gets passed through the Form field items



-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: Gullanian
Date Posted: 23 December 2003 at 5:39pm
Ack ok ill need to create a check key



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net