I'm having trouble getting stripe webhooks to work, this is my code:
require_once('/var/www/html/application/views/config.php');
\Stripe\Stripe::setApiKey("sk_test_***********");
$input = @file_get_contents("php://input");
$event_json = json_decode($input);
//$event = \Stripe\Event::retrieve($event_json->id);
I've verified that $input is receiving the json data, but the $event_json variable is always empty.
I'm really confused by this, it seems like the json_decode is not working even though $input contains the correct data.
Can anyone shed some light on this?
Thanks in advance!