Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

419 unknown status #9

Open
lubomirstankov opened this issue Oct 27, 2017 · 2 comments
Open

419 unknown status #9

lubomirstankov opened this issue Oct 27, 2017 · 2 comments

Comments

@lubomirstankov
Copy link

lubomirstankov commented Oct 27, 2017

When i test with IpN simulator i get 419 Unknown Status

My controller


namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Fahim\PaypalIPN\PaypalIPNListener;

class PayController extends Controller
{


public function check(Request $request)
{
    $ipn = new PaypalIPNListener();
    $ipn->use_sandbox = false;

    $verified = $ipn->processIpn();

    $report = $ipn->getTextReport();

    Log::info("-----new payment-----");

    Log::info($report);

    if ($verified) {
        if ($_POST['address_status'] == 'confirmed') {
            // Check outh POST variable and insert your logic here
            
        }
    } else {
        
    }
}

}
`

My routes:
`<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::post('/check', 'PayController@check');```
@DonDiegoAA
Copy link

I have exactly the same issue. Did you find a solution for this 419 error code ?

Thank you.

@Erroler
Copy link

Erroler commented Aug 24, 2019

Usually 419 errors in Laravel are related to a missing CSRF token in the request.
This happens because in Laravel all POST routes require it. To fix it you should disable the CSRF middleware for that specific route.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants