Skip to content

ryantology/paypal-ipn-laravel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PayPal IPN for Laravel 5

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

Installation

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.*

Usage

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',
)

Configuration

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

Migrations

Run the migrations to create the tables to hold IPN data

$ php artisan migrate

Example

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'));

Resources

To help with IPN testing, PayPal provides the PayPal IPN Simulator.

Support

Please open an issue on GitHub

License

This package is released under the MIT License. See the bundled LICENSE file for details.

About

A PayPal IPN client for Laravel.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%