| Author |
Topic Search Topic Options
|
Gullanian
Senior Member
Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
|
Post Options
Thanks(0)
Quote Reply
Topic: Paypal IPN? Ohhh err! 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!
|
 |
michael
Senior Member
Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
|
Post Options
Thanks(0)
Quote Reply
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...
|
|
|
 |
Mart
Senior Member
Joined: 30 November 2002
Status: Offline
Points: 2304
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
Gullanian
Senior Member
Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
Mart
Senior Member
Joined: 30 November 2002
Status: Offline
Points: 2304
|
Post Options
Thanks(0)
Quote Reply
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.
|
 |
MadDog
Mod Builder Group
Joined: 01 January 2002
Status: Offline
Points: 3008
|
Post Options
Thanks(0)
Quote Reply
Posted: 16 December 2003 at 2:42pm |
|
There are scripts you can buy that do this.
|
|
|
 |
Gullanian
Senior Member
Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
|
Post Options
Thanks(0)
Quote Reply
Posted: 16 December 2003 at 3:09pm |
|
I like to do things myself
|
 |
MorningZ
Senior Member
Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
|
Post Options
Thanks(0)
Quote Reply
Posted: 17 December 2003 at 11:20am |
all about IPN
a "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
|
 |