$insightlyAPI = new Insightly(INSIGHTLY_SECRET);
$hmacHeader = $_SERVER['HTTP_X_SHOPIFY_HMAC_SHA256'];
$requestBody = file_get_contents("php://input");
$isValidWebhookRequest = verifyWebhook($requestBody, $hmacHeader);
if ($isValidWebhookRequest) { LOG_ERROR("***** Webhook request from Shopify *****", LogLevel::HIGH);
$orderJSON = json_decode($requestBody);
processOrderData($orderJSON);}else { // ERROR!!! Bogus request? LOG_ERROR("ERROR: Invalid webhook request from {$_SERVER['REMOTE_ADDR']}");}