|
|
|
PayPal Developer Community >
Forums >
Technical Discussion >
Instant Payment Notification (IPN) >
PHP Template for IPN - Good Starting Point
|
| Jump to Page:
1
·
·
·
·
·
·
·
·
·
| Next Page
|
|
|
|
|
PHP Template for IPN - Good Starting Point
[ Edited ]
|
|
angelleye
Ace Developer
Posts: 3154
Registered: 06-25-2006


Message 1 of 365

Viewed 25,580 times
|

|
|
I developed this little template to use for PayPal's IPN using PHP/MySQL. This isn't quite done yet but I've attached a ZIP of my complete solution for this.
1) Create a MySQL DB to store the data in if you don't already have one available. 2) Extract the zip file 3) Edit the /admin/config.php file with your credentials 4) Upload all files to a directory on your web host. 5) Load /admin/install/index.php in a web browser to install the DB tables. 6) Set your IPN to point to the ipn-listener.php 7) Start hitting it with IPN's from the simulator or live and watch the data arrive! Message Edited by angelleye on 08-31-2009 06:15 PM
|
|
|
|
10-17-2008 02:54 PM
|
|
|
|
|
|
|
|
|
|
|
|
Re: Here's a PHP template for handling IPN's that has been helpful for me and maybe you to.
[ Edited ]
|
|
angelleye
Ace Developer
Posts: 3154
Registered: 06-25-2006


Message 5 of 365

Viewed 25,448 times
|

|
|
I do put it in a database but generally those DB's are never the same. I use this with lots of different clients. It's just a starting point for me so I can begin immediatly with all possible data available to me in PHP variables. Usually what I do is then add include files to handle each particular task the listener might handle. For example, I use this with one client of mine to handle their eBay checkouts and get those orders into their database. I have an include that runs if the IPN came from an eBay checkout. I can easily add the IPN data to their system using this template. I just had to add in the actual database inserts. Another client might have completely different tables and fields names. Another include could be used to handle disputes, and another to handle echecks, etc. Some of my clients use mysql, some use Access, some use FileMaker...can't really handle the DB end of things for everybody. Message Edited by angelleye on 10-19-2008 03:28 PM
|
|
|
|
10-19-2008 03:25 PM
|
|
|
|
|
|
Re: Here's a PHP template for handling IPN's that has been helpful for me and maybe you to.
|
|
Citizen
Regular Visitor
Posts: 10
Registered: 02-18-2008


Message 6 of 365

Viewed 25,353 times
|

|
|
Is it better to use ssl or not? Also, which of these variables do I need to check out in order to know that I receieved money? Basically, I need to know that no matter what method that they used, that I actually got paid and that its actually in my account so that my php script can alter their info on my site. I also have one custom variable that needs to give me their account id from my site, which I have in my form.
|
|
|
|
10-21-2008 11:47 AM
|
|
|
|
|
|
|
|
|
|
Re: Here's a PHP template for handling IPN's that has been helpful for me and maybe you to.
|
|
grimholtz
Contributor
Posts: 14
Registered: 10-13-2006


Message 9 of 365

Viewed 25,325 times
|

|
|
Angeleye, Why can't you simply check if $payment_status equals "Completed" to ensure payment has been completed? You don't need to know txn_type, payment_type, and pending_reason... do you? grimholtz
|
|
|
|
10-21-2008 05:47 PM
|
|
|
|
|
| Jump to Page:
1
·
·
·
·
·
·
·
·
·
| Next Page
|
|
|
|