2
我正在使用銀行api。
銀行發送郵寄請求到我的網站,但沒有返回沒有一個令牌字段是他們的要求,我面臨TokenMismatchException
。
我該如何解決這個問題?
下面是coresponding代碼:
從其他域發送的請求結果TokenMismatchException
public function submitPayment()
{
$api = 'test';
$amount = '3443354';
$redirect = URL::to('new-order/after-payment');
$result = $this->send($api, $amount, $redirect);
$result = json_decode($result);
return redirect("https://example.com/$result->transId");
}
改爲
_csrf_token
可以通過在'應用添加路線/ HTTP /中間件/ VerifyCsrfToken.php'文件中除了陣列 –結帳HTTP禁用CSRF令牌檢查://stackoverflow.com/questions/31427840/laravel-tokenmismatchexception/32125744#32125744 –
@AkshayKhale謝謝 – mehdirahimi