title: How do i debug an invalid webhook payload using stymiee/authnetjson
body: <p>Im using <code>stymiee/authnetjson</code> library to consume and verify an authorize.net webhook in the sandbox environment.</p>
  
  <p>I can verify my headers include</p>
  
  <pre><code>X-ANET-Signature: sha512=C3CC15F7801AA304C0840C85E4F0222A15338827EE3D922DC13A6BB99DF4BFE7D8E235A623480C0EAF3151F7B008E4DFBFDC6E9F493A6901961C5CFC10143289
  </code></pre>
  
  <p>And my json body is</p>
  
  <pre><code>{"notificationId":"c5933ec1-2ef6-4962-a667-10552d19c481","eventType":"net.authorize.payment.authcapture.created","eventDate":"2018-01-20T20:36:54.9163559Z","webhookId":"66cf7109-f42f-45b9-bf36-f1ade83eac48","payload":{"responseCode":1,"authCode":"37ATT8","avsResponse":"Y","authAmount":550.00,"entityName":"transaction","id":"60038744863"}}
  </code></pre>
  
  <p>I have a signature key set up and it all seems correct and similar to the one in the tests for the library</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>$signature_key = "...";
  $headers = getallheaders();
  $payload = file_get_contents("php://input");
  
  $webhook = new JohnConde\Authnet\AuthnetWebhook($signature_key, $payload, $headers);
  
  if ( ! $webhook-&gt;isValid() ) {
      error_log("Payload not valid");
  }
  </code></pre>
  
  <p>I have also tried removing the <code>$headers</code> argument from the constructor args</p>
  
  <p>When I execute a test transaction, it is not valid so I get 'Payload not valid' in the logs.  How can I debug this problem?</p>
  
  <p>Thanks!
  NFV</p>