HOW DO YOU READ THE COMPLICATED WEB HOOK VARIABLES?
I AM ATTEMPTING SEVERAL WAYS AT ASKING THE SAME QUESTION.
HERE IS A VARIABLE THAT CHEDDARGETTER PROVIDES IN THEIR CALLBACK WEB HOOK: subscription[plan][code]
ALL I WANT TO KNOW IS HOW TO READ THIS VARIABLE. HOW DO I TURN THIS VARIABLE INTO THE TEXT THAT IT REPRESENTS?
Discussions are closed to public comments.
If you need help with Cheddar please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by chris on 25 May, 2012 06:40 AM
PHP
2 Posted by chris on 25 May, 2012 06:42 AM
It's obviously JSON or a complex array because trying to read the variable normally yields nothing.
3 Posted by Alex on 25 May, 2012 09:45 AM
No need to spam the forums buddy.
They're just nested arrays.
$_POST["a"]["b"]
is the format you want.$_POST["subscription"]["plan"]["code"]
works fine for me, though you might want to handle the situation where more than 1 plan is present.4 Posted by chris on 25 May, 2012 02:10 PM
Sorry, late night frustration. Won't happen again. Thanks for the tip, works great!
Marc Guyer closed this discussion on 25 May, 2012 02:23 PM.