Comments (2)
index.php?s=/index/index/index
这种获取 回调地址,一直提示签名失败,如果是 /index/index/index 这种路由,就可以签名校验成功
from alipay-global-sdk-php.
@jenchih 您好,$_SERVER['REQUEST_URI']
只有在支持 path_info 的 Web 服务器上,才会打印出完整的带参数的 URL。
在使用前端路由,或者配置了 rewrite 伪静态的情况下,这个值可能与业务实际接收通知的 URL 不一致。
可以先打印 $_SERVER['REQUEST_URI']
的值,看是否与您的预期一致,如果不一致,可以打印 $_SERVER
从中寻找合适的变量。或者用这些变量拼接出实际接收通知的 URL。
$notify = $alipayGlobal->getNotify(array(
'httpMethod' => $_SERVER['REQUEST_METHOD'],
'path' => $_SERVER['REQUEST_URI'], // 请打印 $_SERVER['REQUEST_URI'] 是否与预期一致
'clientId' => $_SERVER['HTTP_CLIENT_ID'],
'rsqTime' => $_SERVER['HTTP_REQUEST_TIME'],
'rsqBody' => file_get_contents('php://input'),
'signature' => $_SERVER['HTTP_SIGNATURE']
));
from alipay-global-sdk-php.
Related Issues (3)
- Payment Notify Verify is 0 HOT 4
- 好像不兼容webman之类的常驻内存的框架 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alipay-global-sdk-php.