当前位置:网站首页>Laravel framework Alipay payment fails to receive asynchronous callback request [original]
Laravel framework Alipay payment fails to receive asynchronous callback request [original]
2022-06-26 04:20:00 【Telkobe】
stay laravel Use Alipay sandbox environment test to pay , It is found that the asynchronous callback method has never been requested . Many people on the Internet say that check whether the authorization callback address is configured incorrectly , But in fact, the authorization callback address has nothing to do with the asynchronous callback address .


The official documents have made it clear , So just rule it out .
Many other answers refer to checking the configuration notify_url Whether the configuration is correct , Must be based on http or https The full address accessible from the public network at the beginning ( Or local test Ngrok Intranet through ), The address cannot be followed by parameters, etc . Generally speaking, these problems seldom occur , And what I encountered has nothing to do with these problems .
Finally, it is found that the callback address is set to support only get request , From the description of asynchronous notification in the above figure, we can see that Alipay is through POST Request this address by , Therefore, the routing access must be set to POST Can request , Of course you can set it any wait .
This is not the end , Check the log and find that the method is still not requested . We can only continue to check , Finally found laravel stay post By default, a request will be made CSRF Protect , Therefore, Alipay was directly intercepted when requesting the address because it did not pass the token verification . To do this, we need to turn off token validation for this address , There are many ways to solve this problem .
You can comment out Kernel.php Medium VerifyCsrfToken middleware , In this way, all requests will not be subject to token verification , You can also add a token whitelist .

边栏推荐
- Guide de la pompe de données Oracle
- What preparations should be made to develop an app from scratch
- 线程同步之读写锁
- Ten important basic principles of software debugging and testing
- Implementation of seven classes of BlockingQueue interface
- College C language final exam · multiple choice questions · summary notes of mistakes and difficulties
- Tencent Interviewer: How did binder get its system services?
- The statistics in the MySQL field become strings, and then they are converted into numbers for sorting
- Upload script file (one sentence back door) WAF bypass (PHP)
- go语言泛型在IDE中语法报错
猜你喜欢
![Fastadmin always prompts sqlstate[23000]: integrity constraint violation: 1052 column 'ID' in order clause is am](/img/71/ed3b2ca9e6d4afd2dae3c601b3a75b.jpg)
Fastadmin always prompts sqlstate[23000]: integrity constraint violation: 1052 column 'ID' in order clause is am

Unity mobile game performance optimization spectrum CPU time-consuming optimization divided by engine modules

What if the serial port fails to open when the SCM uses stc-isp to download software?

In 2022, what professional competitions can college students majoring in automation, electrical engineering and automation participate in?

Matplotlib line chart, text display, win10

What should I do if the 51 SCM board cannot find the device in keil

Spark - 一文搞懂 parquet

【掘金运营套路揭露】真心被掘金的套路....

六、项目实战---识别猫和狗

Spark - understand parquet
随机推荐
What should I do if I don't understand the precious metal indicators
List of provinces, cities and counties in China
一幅脑图总结一下需求分析(工作上实际遇到的情况的补充)
[QT] resource file import
Zhubo Huangyu: you can try these non-agricultural operation skills
Part 4: drawing quadrilateral
Computer network high frequency interview questions
The statistics in the MySQL field become strings, and then they are converted into numbers for sorting
CDN with OSS acceleration
asp. Net web page, ASP connects to the database, and uses asp:panel and asp:dropdownlist controls
Your requirements could not be resolved
Nailing open platform - applet development practice (nailing applet client)
[Qunhui] command line acme SH automatically apply for domain name certificate
微软禁止俄用户下载安装Win10/11
Analysis report on the development trend and operation status of China's environmental monitoring instrument industry from 2022 to 2028
使用Jsoup提取接口中的图片
Minecraft 1.16.5 生化8 模组 1.9版本 1.18版本同步
钉钉开放平台-小程序开发实战(钉钉小程序服务器端)
But the Internet began to have a new evolution and began to appear in a new state
线程同步之互斥量(互斥锁)