This package helps to validate yandexMoney http notification. Laravel Middleware stay front of your API and allow only trusted notifications.
composer require zzzaaa/laravel-yandex-money-http-notify
// app/Http/Kernel.php
protected $routeMiddleware = [
...
'yandexmoney.hash' => \Zzzaaa\LaravelYandexMoneyHttpNotify\Middleware\YandexMoneyHash::class,
];
##Add secret key
//config/services.php
...
'yandex' => [
'notification_secret' => env('YANDEX_SECRET','SECRET KEY')
],
//routes/api.php
Route::post('/payment', 'Api\PaymentsController@store')->middleware('yandexmoney.hash');