src/authnet/AuthnetWebhook.php
public function isValid()
    {
        $hashedBody = strtoupper(hash_hmac('sha512', $this->webhookJson, $this->signature));
        return (isset($this->headers['X-ANET-SIGNATURE']) && strtoupper(explode('=', $this->headers['X-ANET-SIGNATURE'])[1]) === $hashedBody);
    }
public function isValid()
    {
        $hashedBody = strtoupper(hash_hmac('sha512', $this->webhookJson, $this->signature));
        return (isset($this->headers['X-ANET-SIGNATURE']) && strtoupper(explode('=', $this->headers['X-ANET-SIGNATURE'])[1]) === $hashedBody);
    }
public function isValid ( ) { $ hashedBody = strtoupper ( hash_hmac ( 'sha512' , $ this -> webhookJson , $ this -> signature ) ) ; return ( isset ( $ this -> headers [ 'X-ANET-SIGNATURE' ] ) && strtoupper ( explode ( '=' , $ this -> headers [ 'X-ANET-SIGNATURE' ] ) [ 1 ] ) === $ hashedBody ) ; }
Validates a webhook signature to determine if the webhook is valid

@return bool
Validates a webhook signature to determine if the webhook is valid