php - 返回 200 OK 响应
问题描述
我有一个 webhook,它在成功支付订单后发送 XML 和邮件。支付提供商 (Mollie) 需要得到 200 OK 响应,否则它会一直调用我的 webhook,它会继续发送 XML 和邮件。任何人都知道我在这里做错了什么..?
if($payment->status == 'paid') {
// Create XML file
include_once("create-xml.php");
file_put_contents("order-" . $orders[0]['id'] . ".xml",$xml);
// Send XML file
include_once("send-xml.php");
// Delete XML file
unlink("order-" . $orders[0]['id'] . ".xml");
// Send e-mail to customer
include_once("send-mail.php");
header(':', true, 200);
header('X-PHP-Response-Code: 200', true, 200);
return;
}
解决方案
推荐阅读
- jquery - Angular 5 jQuery - 如何修改 DOM 元素?
- javascript - wordpress页面如何插入带有分页的表格
- python - 在 python-numpy 中定义一个自定义 float8 并从/转换为 float16?
- android - 如何查询其文档具有参考字段的集合并使用参考字段数据进行查询?
- javascript - 发出 JQuery Post 命令时,Event.preventDefault() 不起作用
- java - 如何在不使用 String Buffer 类 replace() 方法的情况下替换字符串中的字符?
- python-2.7 - 无法覆盖超类 __init__():对象没有属性“_testMethodName”?
- http - 从 CloudWatch 流式传输日志数据
- python - 在 Pandas 中写入和加载数字字符串的 csv 时如何防止 dtype 更改
- android - 为什么 Kotlin 在一段非常简单的代码中抛出异常?