1

after composer update i got following error

( ! ) Fatal error: Uncaught exception 'ReflectionException' with message 'Class App\Http\Kernel does not exist' in D:\wamp\www\gastrodr\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 779
( ! ) ReflectionException: Class App\Http\Kernel does not exist in D:\wamp\www\gastrodr\vendor\laravel\framework\src\Illuminate\Container\Container.php on line 779

composer.json : which i get from ignited/laravel-omnipay from GIT repositary

{
    "name": "ignited/laravel-omnipay",
    "description": "Integerates Omnipay with Laravel and provides an easy configuration.",
    "keywords": ["omnipay", "payments", "laravel", "laravel5"],
    "authors": [
        {
            "name": "Alex Whiteside",
            "email": "alexwhiteside@ignitedlabs.com.au"
        }
    ],
    "require": {
        "php": ">=5.4.0",
        "illuminate/support": "~5",
        "omnipay/common": "2.3.*"
    },
    "autoload": {
        "psr-0": {
            "Ignited\\LaravelOmnipay": "src/"
        }
    },
    "extra": {
        "branch-alias": {
            "dev-master": "2.0-dev"
        }
    },
    "minimum-stability": "dev"
}

please advice me to fix this issue

=======

UPDATE

PaymentController - which used for paypal configuration

namespace App\Http\Controllers;
use Omnipay\Omnipay;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Input;
use Session;
class PaymentController extends Controller
{
    private $data;
    public function getIndex()
    {   
        $this->data['product'] = 'Aurvana Platinum';
        $this->data['productImage'] = 'http://img.creative.com/images/products/large/pdt_21734.png.ashx?width=200';
        $this->data['price'] = '299.00';
        $this->data['currency'] = 'USD';
        $this->data['description'] = 'Flagship Over-the-ear Bluetooth® Headset with NFC';
        return View('hello', $this->data);
    }

    public function postPayment() 
    {
            $params = array(
                    'cancelUrl'     => 'http://localhost/cancel_order',
                    'returnUrl'     => 'http://localhost/payment_success', 
                    'name'      => Input::get('name'),
                    'description'   => Input::get('description'), 
                    'amount'    => Input::get('price'),
                    'currency'  => Input::get('currency')
            );

            Session::put('params', $params);
            Session::save();  

        $gateway = Omnipay::create('PayPal_Express');
        $gateway->setUsername('paypal account');
        $gateway->setPassword('paypal password');
        $gateway->setSignature('AiPC9BjkCyDFQXbSkoZcgqH3hpacASJcFfmT46nLMylZ2R-SV95AaVCq');
        $gateway->setTestMode(true);
        $response = $gateway->purchase($params)->send();
            if ($response->isSuccessful()) {

                // payment was successful: update database
                print_r($response);
        } elseif ($response->isRedirect()) {
faz faz
  • 171
  • 1
  • 3
  • 16

1 Answers1

0

Replace the contents of the composer.json file with these:

{ "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "type": "project", "require": { "php": ">=5.5.9", "laravel/framework": "5.1.*", "ignited/laravel-omnipay": "2.*" }, "require-dev": { "fzaninotto/faker": "~1.4", "mockery/mockery": "0.9.*", "phpunit/phpunit": "~4.0", "phpspec/phpspec": "~2.1" }, "autoload": { "classmap": [ "database" ], "psr-4": { "App\\": "app/" } }, "autoload-dev": { "classmap": [ "tests/TestCase.php" ] }, "scripts": { "post-install-cmd": [ "php artisan clear-compiled", "php artisan optimize" ], "pre-update-cmd": [ "php artisan clear-compiled" ], "post-update-cmd": [ "php artisan optimize" ], "post-root-package-install": [ "php -r \"copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "php artisan key:generate" ] }, "config": { "preferred-install": "dist" } }

And run composer install or composer update

  • Sumon Molla thanks im getting this error now on command line [Symfony\Component\Debug\Exception\FatalErrorException] Class 'Ignited\LaravelOmnipay\LaravelOmnipayServiceProvider' not found – faz faz Aug 04 '15 at 15:54
  • Remove the service provider you added on the app.php file. Then run the install and update. After that add the service provider and alias on the app.php file. Hope this will work. – Muhammad Sumon Molla Selim Aug 04 '15 at 16:05
  • ok it works may i know where to put \Ignited\LaravelOmnipay folder – faz faz Aug 04 '15 at 16:17
  • You don't need to do anything or put any folder manually. Composer has already done that for you. You just add the service and alias on your config/app.php file. Then you are good to go :) – Muhammad Sumon Molla Selim Aug 04 '15 at 16:21
  • everything working almost fine now .. im getting this error now :( FatalErrorException in PaymentController.php line 34: Class 'Omnipay\Omnipay' not found check my question i updated the controller – faz faz Aug 04 '15 at 16:55