A
A
ARX22019-02-01 14:19:02
Laravel
ARX2, 2019-02-01 14:19:02

How to fix 405 Not Allowed POST request error sent via API?

Good afternoon.
I met with such an error 405 Not Allowed.
The fact is that I connected the online payment with the bank via the API, the payment is successful, but after the payment they send the data that I need via a POST request, only the 405 Not Allowed error is rolled out.
How to overcome? The whole Google was covered. Even disabled CerifyCsrfToken verification in Kernel

protected $middlewareGroups = [
        'web' => [
            \App\Http\Middleware\EncryptCookies::class,
            \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
            \Illuminate\Session\Middleware\StartSession::class,
            // \Illuminate\Session\Middleware\AuthenticateSession::class,
            \Illuminate\View\Middleware\ShareErrorsFromSession::class,
            //\App\Http\Middleware\VerifyCsrfToken::class,
            \Illuminate\Routing\Middleware\SubstituteBindings::class,
        ],

help me please

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Wells, 2019-02-01
@ARX2

Look php artisan route:list. If you are sure that /notificationthere is a POSTmethod, then look in cors - it is from some version of the stall out of the box, and it also throws this error. In addition to it, there is nothing in the stall's default set that could lead to such a result. So if everything is in order with cors (try to disable it or configure it), then do Find in path in /vendor(or better, in the entire project) and look for any mentions of 405, MethodNotAllowedand METHOD_NOT_ALLOWED.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question