Php 请参见外部端点/webhook的POST输出

Php 请参见外部端点/webhook的POST输出,php,echo,webhooks,endpoint,Php,Echo,Webhooks,Endpoint,PHP中是否有任何方法可以查看来自外部源的帖子的输出。例如,来自stripe webhook的帖子 $body = @file_get_contents('php://input'); $response = json_decode($body); \Stripe\Stripe::setApiKey('MyKey'); if(!empty($response)) { switch($response->type) { case "customer.created"

PHP中是否有任何方法可以查看来自外部源的帖子的输出。例如,来自stripe webhook的帖子

$body = @file_get_contents('php://input');
$response = json_decode($body);

\Stripe\Stripe::setApiKey('MyKey');
if(!empty($response)) {
    switch($response->type) {
        case "customer.created":
            echo $response->data->object->email;
            exit;
    }
}
我只能从web服务器获取日志:

54.XXX.XXX.XXX - - [18/Jun/2020:15:55:06 +0200] "POST /external/webhooks/stripe/endpoint_subscriptions.php HTTP/1.1" 200 31 "-" "Stripe/1.0 (+https://stripe.com/docs/webhooks)"