This package allows for the painless creation of a PayPal IPN listener in the Laravel 4 framework. Originally developed by logicalgrape, it was forked an updated to cope with the POODLE vulnerability and consequential disabling of SSLv3 by PayPal
Edit composer.json
and add:
{
"require": {
"riccamastellone/paypal-ipn-laravel": "3.*"
}
}
And install dependencies:
$ composer update
Laravel 4: If you need to use this package with Laravel 4, you may use version 2.*
Find the providers
key in config/app.php
and register the PayPal IPN Service Provider.
'providers' => array(
// ...
'Digitag\PayPalIpnLaravel\PayPalIpnServiceProvider',
)
Find the aliases
key in config/app.php
and register the PayPal IPN Facade.
'aliases' => array(
// ...
'IPN' => 'Digitag\PayPalIpnLaravel\Facades\IPN',
)
Publish and edit the configuration file
$ php artisan vendor:publish
This will create a config/paypal.php
file in your app that you can modify to set your configuration
and add then required database migration for this package to work
Run the migrations to create the tables to hold IPN data
$ php artisan migrate
Create the controller PayPal will POST to
$ php artisan make:controller IpnController --only=store
Open the newly created controller and add the following to the store action
$order = IPN::getOrder();
Edit app/Http/routes.php
and add:
Route::post('ipn', array('uses' => 'IpnController@store', 'as' => 'ipn'));
To help with IPN testing, PayPal provides the PayPal IPN Simulator.
Please open an issue on GitHub
This package is released under the MIT License. See the bundled LICENSE file for details.