【发布时间】:2021-03-20 02:44:46
【问题描述】:
我正在使用应用程序的 PHP API。来自应用程序的文档,回调函数(https://www.digisigner.com/esignature-api/esignature-api-documentation)
If you need to be informed about the completion of the task
request, you can register for an event notification. To accomplish
this, a callback URL must be specified in your account settings.
The callback URL will be automatically called by the app when the
task request has been completed, that is, when all the documents
have been processed.
文档还在继续:
The app expects the response code 200 from your callback code, and
the response text should be ‘EVENT_ACCEPTED’
我已经为事件通知注册了回调 URL(例如:http://my_project/callback.php)
我的问题:
-
我的 PHP 回调函数如何在任务完成后获取应用程序发送的信息?
-
我的 PHP 回调函数如何返回代码 200 和响应文本?
感谢您的帮助。
【问题讨论】:
-
如果存在,它应该返回 200。你会假设在 $_POST 中传递了数据,它应该记录在 API 代码中的某个地方
-
不要将回调 URL 与 callback function 混淆。 API 文档只是说你可以公开一个脚本来接收通知。
标签: php