title: PHP Listener Script for Paypal Webhooks
body: <p>I'm having trouble writing a PHP listener script for Paypal notification webhooks. I simply need a script to listen for and request the Paypal json data. I have created one for Stripe successfully, thanks to plenty of online documentation. This is what I have:</p>
  
  <pre><code>&lt;?php require_once('./lib/Stripe.php');
      Stripe::setApiKey("my_secret_stripe_key");
  
      $input = @file_get_contents("php://input");
      $event_json = json_decode($input);
  
      // then I request the json data from a Stripe event... //
      $event_json-&gt;type == 'charge.succeeded'
      // etc... //
  ?&gt;
  </code></pre>
  
  <p>I just need something similar to handle Paypal event json. </p>