asmith Posted January 19, 2008 Share Posted January 19, 2008 hey guys , i am gonna set up paypal ipn script , this one : http://www.web-bureau.com/modules/free-php-paypal-ipn-script.php i've got no problem with it , but the thing is i don't know how can i find out which user has been transfering to the site . i want to save the amount a user transfer to the site paypal account, this ipn takes all the information about the person you transfer ... but do not give me which one of my site users have transfered that amount . i see phpfreaks (for donations) asks "if you want to be recognize please first login" . how can i apply it ? so that i know which one of my site users have transfered ? Quote Link to comment https://forums.phpfreaks.com/topic/86783-paypal-ipn-phpfreaks/ Share on other sites More sharing options...
Sam Granger Posted January 19, 2008 Share Posted January 19, 2008 Well, this should help http://www.micahcarrick.com/04-19-2005/php-paypal-ipn-integration-class.html Have the paypal success page get the user_id and the returned amount from paypal and insert into DB Quote Link to comment https://forums.phpfreaks.com/topic/86783-paypal-ipn-phpfreaks/#findComment-443608 Share on other sites More sharing options...
asmith Posted January 19, 2008 Author Share Posted January 19, 2008 so users must first sign in to site, then go through transfering, right ? Quote Link to comment https://forums.phpfreaks.com/topic/86783-paypal-ipn-phpfreaks/#findComment-443618 Share on other sites More sharing options...
Sam Granger Posted January 19, 2008 Share Posted January 19, 2008 Yes, users must first sign in. When they are returned to the site with successful payment, a SQL query is made - insert into donations table or whatever. Get user id of logged in user and amount that they paid and store in DB Quote Link to comment https://forums.phpfreaks.com/topic/86783-paypal-ipn-phpfreaks/#findComment-443652 Share on other sites More sharing options...
asmith Posted January 19, 2008 Author Share Posted January 19, 2008 thanks for the tips . i'm a little bit confused. must figure it all . another thing, so no need for the ipn script i started the thread with , use 2 scripts in your link intead ? Quote Link to comment https://forums.phpfreaks.com/topic/86783-paypal-ipn-phpfreaks/#findComment-443669 Share on other sites More sharing options...
Ninjakreborn Posted January 19, 2008 Share Posted January 19, 2008 The id is paypal is only paypal. The IPN system is meant for paypal to send data BACk to you that you pass through the form. Basically this is the process. * Force the user's to register * When they register pass there user id into a session everytime they login. * When you do your paypal form add a hidden field into the ipn system (based on the specifications listed in there documentation). * When they submit paypal processes the payment and does it's thing. DURING that process it sends a post token BACK to a page you specify as the IPN pge where you can grab the id, do some programming to do whatever database work you need, and that's it. That's the IPN system. IF you aren't advanced there is another (not as secure way). That is naturally use paypal, but set a session before they buy. After paypal ssends the user physically back to the site then grab the id and do it when the user get's back by running the script in the browser. This is not as secure because if they choose not to "Go back to vendor" from paypal then they never get to the processing scripts, and so you never know they paid. Without physically checking. However if you do it with IPN then it's almost full-proof. Quote Link to comment https://forums.phpfreaks.com/topic/86783-paypal-ipn-phpfreaks/#findComment-443778 Share on other sites More sharing options...
Sam Granger Posted January 19, 2008 Share Posted January 19, 2008 Sorry didnt have a look - that code you provided will also do - just include a user_id column in database. Quote Link to comment https://forums.phpfreaks.com/topic/86783-paypal-ipn-phpfreaks/#findComment-443780 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.