在作曲家更新后我遇到了以下错误
( ! ) 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:我从GIT repositary的ignited / laravel-omnipay获得
{
"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"
}
请建议我解决这个问题
=======
更新
PaymentController - 用于paypal配置
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()) {
答案 0 :(得分:0)
用以下代码替换composer.json文件的内容:
{
"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"
}
}
并运行composer install
或composer update