Login   Register  
PHP Classes
elePHPant
Icontem

paypal_ipn: Paypal payment notification processing

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2002-11-22 (11 years ago) RSS 2.0 feedStarStarStarStar 60%Total: 5,872 This week: 2All time: 360 This week: 847Down
Version License Categories  
paypal_ipn 1.0GNU Lesser General Publ...E-Commerce, Finances
Description Author  

This class is usefull to process Instant Payment Notification (IPN) from Paypal.
See www.paypal.com for more information about IPN.

Note : This class requires cURL PHP module.

So... how should I use this ? This requires that:
a) you already know what IPN is
b) you setup your Paypal account so that IPN are sent to a URL on your website
In this example, let's consider it is http://yourserver.com/backoffice/ipn.php

1) Paypal server posts a request to http://yourserver.com/backoffice/ipn.php
2) Create the IPN object: $pp = new paypal_ipn ();
3) Provide the IPN object with 2 functions: the first one will be called as soon as you receive the post. The second one will be called when Paypal's server
confirms or denies your response.
$pp->set_process_functions ("my_pre_processing", "my_post_processing");
4) Pass the POST table to the Paypal processor
$pp->process_notification ($_POST, true);
5) The "my_pre_processing" function is automatically called
6) The class calls-back Paypal secure server, using cURL and Paypal server
confirms or denies your response.
7) The "my_post_processing" function is automatically called

Picture of Herve FOUCHER
Name: Herve FOUCHER <contact>
Classes: 1 package by
Country: France France
Age: ???
All time rank: 44422 in France France
Week rank: 748 Down23 in France France Down

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Usefull for testing i_paypal.php
Plain text file i_paypal.php Class The file containing the class to be included
Accessible without login Plain text file virtual_paypal.php Test A fake and random (either INVALID or VERIFIED) Paypal server response

 Version Control Unique User Downloads Download Rankings  
 0%Total:5,872All time:360
 This week:2This week:847Down
User Ratings User Comments (1)  
 All time
Utility:82%StarStarStarStarStar
Consistency:75%StarStarStarStar
Documentation:-
Examples:61%StarStarStarStar
Tests:54%StarStarStar
Videos:-
Overall:60%StarStarStarStar
Rank:861