Hi Alex, sorry for the late response. I think the issue is that PHP converts any dots in variable names to underscores, so simply changing your code to this:
data = json\_decode(_POST[‘data_json’]);
should fix it right up!
See here for more information:
http://www.php.net/manual/en/language…
I was reading a thread on PHP6, and there’s debate amongst the developers as to whether or not this behaviour makes sense. Here’s the discussion if you’re interested:
http://www.pubbs.net/201001/php/48930…
Hope that helps! Would love to hear more about how you’re using our webhook…
Cheers!
Hi Carl,
Thank you for the reply. I tried and tested your idea. Unfortunately, it didn’t help - still can’t process data posted in json format…
Cheers,
Alex
Hi Alex, sorry to hear that didn’t get it working for you. I’ve just tested this again, using a sample PHP script I’ve created, and I can tell you that it definitely works. Here’s the exact script I used (just add your own email address at the bottom).
http://gist.github.com/430561
Can you send your script to support@unbounce.com so we can have a look? Also, which version of PHP are you using?