验证同步通知的真实性
打赏作者

beaplat-61f

博主一个学生怎么申请支付宝账户的。。。

JellyBool 回复 beaplat-61f

你去注册公司啊……

YVEND 回复 JellyBool

哈哈哈,很强势!

YVEND

@jellybool, 我用的ping++对接的微信支付,
Route::post(‘webhook’, ‘WebhookController@index’); //webhook 路由
public function index(Request request) { dd(raw_data = file_get_contents(‘php://input’));
}
但接受webhook时候都是返回419,拿不到webhook内容。因为比较急,所以直接来问了。

JellyBool 回复 YVEND

具体是什么错误?有可能是你的配置没对吧

YVEND

ping++测试微信支付webhook 老是419. 回复好像不能发图…

JellyBool 回复 YVEND

这个是 laravel 的 csrf_token 没过滤吧

YVEND 回复 JellyBool

是的。确实是这个问题.现在已经解决了。谢谢!

YVEND
    <title>Page Expired</title>

    <!-- Fonts -->
    <link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">

    <!-- Styles -->
    <style>
        html, body {
            background-color: #fff;
            color: #636b6f;
            font-family: 'Raleway', sans-serif;
            font-weight: 100;
            height: 100vh;
            margin: 0;
        }

        .full-height {
            height: 100vh;
        }

        .flex-center {
            align-items: center;
            display: flex;
            justify-content: center;
        }

        .position-ref {
            position: relative;
        }

        .content {
            text-align: center;
        }

        .title {
            font-size: 36px;
            padding: 20px;
        }
    </style>
</head>
<body>
    <div class="flex-center position-ref full-height">
        <div class="content">
            <div class="title">
                    The page has expired due to inactivity.
<br/><br/>
Please refresh and try again.
            </div>
        </div>
    </div>
</body>