zzzaaa / laravel-yandex-money-http-notify
此包最新版本(v1.0.1)没有可用的许可证信息。
v1.0.1
2017-03-08 16:25 UTC
This package is not auto-updated.
Last update: 2024-09-18 20:29:57 UTC
README
此包有助于验证yandexMoney HTTP通知。Laravel中间件位于您的API前端,仅允许信任的通知。
安装
composer require zzzaaa/laravel-yandex-money-http-notify
安装中间件
// app/Http/Kernel.php protected $routeMiddleware = [ ... 'yandexmoney.hash' => \Zzzaaa\LaravelYandexMoneyHttpNotify\Middleware\YandexMoneyHash::class, ];
##添加密钥
//config/services.php ... 'yandex' => [ 'notification_secret' => env('YANDEX_SECRET','SECRET KEY') ],
将中间件添加到路由中
//routes/api.php Route::post('/payment', 'Api\PaymentsController@store')->middleware('yandexmoney.hash');