I'm working on a plugin for OctoberCMS and will use Omnipay. I've done a research and found some packages that integrates the Omnipay library with Laravel as ignited/omnipay and barryvdh/laravel-omnipay. I've tried both of them by following this steps (all on the plugin directory):
Create a
composer.json
file and add this:{ "name": "BalanceRecharge Plugin", "email": "[email protected]", "require": { #in this case I'm using barryvdh/laravel-omnipay "barryvdh/laravel-omnipay": "0.1.*", "omnipay/omnipay": "*" } }
Run
composer update
for update library and dependencies, all goodAdd
'Barryvdh\Omnipay\ServiceProvider'
to the providers:'providers' => array_merge(include(base_path().'/modules/system/providers.php'), array( // 'Illuminate\Html\HtmlServiceProvider', // Example 'System\ServiceProvider', 'Barryvdh\Omnipay\ServiceProvider', )),
Then try to run the command
php artisan config:publish barryvdh/laravel-omnipay
but get the error below:
PHP Fatal error: Class 'Barryvdh\Omnipay\ServiceProvider' not found in /var/www/html/alomicuba/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 157 PHP Stack trace: PHP 1. {main}() /var/www/html/alomicuba/artisan:0 PHP 2. require_once() /var/www/html/alomicuba/artisan:30 PHP 3. require() /var/www/html/alomicuba/bootstrap/start.php:57 PHP 4. Illuminate\Foundation\ProviderRepository->load() /var/www/html/alomicuba/vendor/laravel/framework/src/Illuminate/Foundation/start.php:210 PHP 5. Illuminate\Foundation\ProviderRepository->compileManifest() /var/www/html/alomicuba/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:57 PHP 6. Illuminate\Foundation\ProviderRepository->createProvider() /var/www/html/alomicuba/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:121
What I'm doing wrong? What is the right way to register the Provider?