S
S
stdio962016-06-24 21:10:00
Laravel
stdio96, 2016-06-24 21:10:00

How to cancel CSRF validation of a 3rd party server request in Laravel?

Hello. I want to connect a payment system (webmoney) to the site. But when I try to check the link of the payment result, I get the response code 500. I found out that the problem is in the token. When I do this, everything works (since the check is disabled on all routes).

class VerifyCsrfToken extends BaseVerifier
{
    /**
     * The URIs that should be excluded from CSRF verification.
     *
     * @var array
     */
    protected $except = [
        //
        '*'
    ];
}

But, when I try to select only merchant.webmoney.ru*, then it gives a 500 response.
class VerifyCsrfToken extends BaseVerifier
{
    /**
     * The URIs that should be excluded from CSRF verification.
     *
     * @var array
     */
    protected $except = [
        //
        'https://merchant.webmoney.ru*'
    ];
}

Question: how can I turn off the verification of tokens from requests from third-party servers, namely from webmoney?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2016-06-24
@stdio96

In except, you need to add ROUTES on YOUR site, for which the token will NOT be checked.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question