public function validate_webhook($params) {

    $sig = $params['signature'];
    unset($params['signature']);

    if ( ! isset($sig)) {
      return false;
    }

    $data = array(
      'data'      => $params,
      'secret'    => $this->account_details['app_secret'],
      'signature' => $sig
    );

    return $this->validate_signature($data);

  }
public function validate_webhook($params) {

    $sig = $params['signature'];
    unset($params['signature']);

    if ( ! isset($sig)) {
      return false;
    }

    $data = array(
      'data'      => $params,
      'secret'    => $this->account_details['app_secret'],
      'signature' => $sig
    );

    return $this->validate_signature($data);

  }
public function validate_webhook ( $ params ) { $ sig = $ params [ 'signature' ] ; unset ( $ params [ 'signature' ] ) ; if ( ! isset ( $ sig ) ) { return false ; } $ data = array ( 'data' => $ params , 'secret' => $ this -> account_details [ 'app_secret' ] , 'signature' => $ sig ) ; return $ this -> validate_signature ( $ data ) ; }
Test whether a webhook is valid or not

@param array params The contents of the webhook in array form

@return boolean If valid returns true
Test whether a webhook is valid or not