Ich versuche, den Bigcommerce Webhook zu implementieren, und ich habe erfolgreich Cretead Store/Produkt/aktualisiert * Webhook. Wenn ich versuche, die Antwort auf meine Ziel-URL zu bekommen, bekomme ich nichts. Ich verwende folgenden Code, um die Antwort, die von Webhook an meine URL gesendet wird, aufzuzeichnen. Mein Code istBigcommerce Webhook
<?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));
?>
Aber immer noch bekomme ich nichts. Das BigCommerce-Team sagt, dass wir beim Auschecken dieser Ziel-URL scheinbar Webhooks senden und eine 200-Antwort von Ihrem Server korrekt empfangen. Aber ich kann nichts aufnehmen.