I am trying to implement the Bigcommerce webhook and I have successfullly cretead the store/product/updated* webhook. When I am trying to get the response on my destination url, I am getting nothing. I am using following code to record the response which is send by webhook to my url. My code is
<?php
$webhook_content = '';
$webhook = fopen('php://input' , 'rb');
while(!feof($webhook)){ //loop through the input stream while the end of file is not reached
$webhook_content .= fread($webhook, 4096); //append the content on the current iteration
}
fclose($webhook); //close the resource
$data=$webhook_content;
$data = json_decode($webhook_content,true); //convert the json to array
$myfile = __DIR__.'/productupdatelog.txt';
file_put_contents($myfile, print_r($data,true));
?>
But still I am not getting anything. Bigcommerce team is saying that Checking out that destination URL we do appear to be sending you webhooks and properly receiving back a 200 response from your server. But I am not able too record anything.