PHP Classes
elePHPant
Icontem

paypal_ipn: Paypal payment notification processing

Recommend this page to a friend!
  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 (13 years ago) RSS 2.0 feedStarStarStarStar 61%Total: 5,945 All time: 374 This week: 953Down
Version License Categories
paypal_ipn 1.0.0GNU Lesser Genera...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

  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,945
This week:0
All time:374
This week:953Down
User Ratings User Comments (1)
 All time
Utility:83%StarStarStarStarStar
Consistency:76%StarStarStarStar
Documentation:-
Examples:63%StarStarStarStar
Tests:56%StarStarStar
Videos:-
Overall:61%StarStarStarStar
Rank:1043