简体   繁体   English

在集成 Jazzcash 支付集成时,在我返回 URL 时获取 419 页面已过期

[英]Getting 419 Page expired on my return URL while integrating Jazzcash Payment Integration

I am trying to integration Jazzcash in my Laravel Project.我正在尝试将 Jazzcash 集成到我的 Laravel 项目中。 Whenever i try to do checkout it redirect to Jazzcash Payment page but before page load it redirect me back to my return URL with 419 Page expired while all of my parameters got success in API log inside Jazzcash Sandbox account but Payment got failed.每当我尝试结帐时,它都会重定向到 Jazzcash 支付页面,但在页面加载之前,它会将我重定向回我的返回 URL,419 页面已过期,而我的所有参数在 API 登录 Jazzcash 沙箱帐户中都成功,但付款失败。

Callback url is a post request coming from Jazzcash.回调 url 是来自 Jazzcash 的post请求。 Since every laravel post request require csrf token it will throw 419 error because that request will not contain any token.由于每个 laravel 发布请求都需要csrf令牌,因此它将抛出 419 错误,因为该请求不包含任何令牌。 So to ignore token for that particular url you need to add that url in VerifyCsrfToken.php middleware.因此,要忽略特定 url 的令牌,您需要在VerifyCsrfToken.php中间件中添加 url。

In file add that route in $except array.在文件中将该路由添加到$except数组中。

protected $except = [
'name-of-your-route'
];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM