J
J
Justique2016-03-14 12:25:12
ROBOKASSA
Justique, 2016-03-14 12:25:12

Robokassa and Laravel how to transfer a token?

Good afternoon,
we set the task to implement the work of Laravel 5.0.1 with the robokassa service.
But there was a problem when validating a successful payment, namely, that in response to POST data in Laravel, you need to send csrf_token . Share your advice.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
J
JhaoDa, 2016-03-14
@JhaoDa

You don’t need to force Robokassa to transfer csrf_token, you need to add the addresses where Robokassa knocks to the exceptions of the VerifyCsrfToken intermediary (but in 5.0 there is no such possibility out of the box, so look at how it was done in 5.1 and do the same).
Well, use https://github.com/idma/robokassa

E
Eugene, 2016-03-14
@Nc_Soft

<?php

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;

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

D
D', 2016-03-14
@Denormalization

You can remove the csrf_token check if it is not needed. (Disable middleware in Http\Kernel.php)
You can write your own class to check csrf_token and instead of `_token` take data from a custom field (`shp_*`)

A
Andrzej Wielski, 2016-03-14
@wielski

Use omnipay, no crutches needed.
https://github.com/ignited/laravel-omnipay
https://github.com/hiqdev/omnipay-robokassa

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question