PHPackages                             toolani/paypal-ipn-verifier - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. toolani/paypal-ipn-verifier

ActiveLibrary[Payment Processing](/categories/payments)

toolani/paypal-ipn-verifier
===========================

Verifies Paypal IPNs

1.1.0(11y ago)125.8k↓100%3BSD-3-ClausePHPPHP &gt;=5.3.0

Since Jan 7Pushed 11y ago14 watchersCompare

[ Source](https://github.com/toolani/paypal-ipn-verifier-php)[ Packagist](https://packagist.org/packages/toolani/paypal-ipn-verifier)[ Docs](http://github.com/toolani/paypal-ipn-verifier-php)[ RSS](/packages/toolani-paypal-ipn-verifier/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

PayPal IPN Verifier
===================

[](#paypal-ipn-verifier)

A PayPal Instant Payment Notification (IPN) verifier class for PHP 5.

Use the `IpnVerifier` class in your IPN script to handle the encoding of POST data, post back to PayPal, and parsing of the response from PayPal.

This class was based on (and is almost API-compatible with) [Quixotix/PHP-PayPal-IPN](https://github.com/Quixotix/PHP-PayPal-IPN). See below for differences and tips for porting your code.

Features
--------

[](#features)

- Supports live and sandbox environments.
- Verifies an HTTP "200" response status code from the PayPal server.
- Get detailed plain text reports of the entire IPN using the `getTextReport()`method for use in emails and logs to administrators.
- Throws various exceptions to differentiate between common errors in code or server configuration versus invalid IPN responses.

Differences from Quixotix/PHP-PayPal-IPN
----------------------------------------

[](#differences-from-quixotixphp-paypal-ipn)

- Always verifies IPNs using SSL.
- Always uses cURL (no fsockopen support).
- PSR-2 compliant coding style.

Getting Started
---------------

[](#getting-started)

This code is intended for web developers. You should understand how the IPN process works conceptually and you should understand when and why you would be using IPN. Reading the [PayPal Instant Payment Notification Guide](https://github.com/Quixotix/PHP-PayPal-IPN) is a good place to start.

You should also have a [PayPal Sandbox Account](https://cms.paypal.com/cms_content/US/en_US/files/developer/IPNGuide.pdf) with a test buyer account and a test seller account. When logged into your sandbox account there is an IPN simulator under the 'Test Tools' menu which you can used to test your IPN listener.

Once you have your sandbox account set up, you simply create a PHP script that will be your IPN listener. In that script, use the `IpnVerifier()` class as shown below.

```
