首页 > 解决方案 > 返回 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;

        }

标签: phphttpresponsepayment-processing

解决方案


推荐阅读