PHP Classes

paypal_ipn: Paypal payment notification processing

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 61%Total: 5,969 All time: 383 This week: 560Down
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
Age: ???
All time rank: 47926 in France France
Week rank: 215 Up10 in France France Up

  Files folder image Files (3)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:5,969
This week:0
All time:383
This week:560Down
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:1051