Payum / PayumLaravelPackage

Payum offers everything you need to work with payments. From simplest use cases to very advanced ones.
https://payum.forma-pro.com/
MIT License
122 stars 38 forks source link

Does this package support laravel 5.2? #30

Closed GopaThemes closed 8 years ago

GopaThemes commented 8 years ago

Hello, I want to use this package with Laravel 5.2.. Does this support the 5.2.? If yes, where I can get updated documentation? Because on this thread @makasim said: "The latest version 1.0 does not require any configs at all.". But on the offical website docs and on github docs I can see the author is talking about to place the configuration code. Also the file bootstrap/start.php is not exist.

Where should I place the configuration code?

thank you

makasim commented 8 years ago

Most probably yes it is

serpentblade commented 8 years ago

bootstrap/start.php doesn't exist in Laravel 5.2, which isn't a problem since that file was always a bit of a hack. Put that configuration code into the app/Providers/AppServiceProvider.php:

...
public function register()
{
    $this->app->resolving('payum.builder', function(\Payum\Core\PayumBuilder $payumBuilder) {
            $payumBuilder
            // this method registers filesystem storages, consider to change them to something more
            // sophisticated, like eloquent storage
            ->addDefaultStorages()

            ->addGateway('paypal_ec', [
                'factory' => 'paypal_express_checkout',
                'username' => 'EDIT ME',
                'password' => 'EDIT ME',
                'signature' => 'EDIT ME',
                'sandbox' => true
            ]);
        });
}
...
makasim commented 8 years ago

@serpentblade Could you please send the PR with fix for the doc?