I'm trying to integrate PHP Webhooks with the Onfleet API. The Documentation says I must return a simple string response
http://docs.onfleet.com/docs/webhooks#create-webhook
Here is my code
$input = file_get_contents("php://input");
if (isset($input)) {
header('Content-Type: application/json');
echo $input->check;
}
I keep receiving the error "Value received in response does not match the value we sent you"
I would do it like this
if ($_SERVER['REQUEST_METHOD'] === 'GET' && isset($_GET['check']))
{
header('Content-Type: application/json');
echo $_GET['check'];
}