返回200 OK响应

时间:2019-12-23 13:29:23

标签: php httpresponse payment-processing

我有一个Webhook,可以在成功付款后发送XML和邮件。付款服务提供商(Mollie)需要获得200 OK响应,否则它将继续呼叫我的Webhook,该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;

        }

0 个答案:

没有答案