HOW DO YOU READ THE COMPLICATED WEB HOOK VARIABLES?

chris's Avatar

chris

25 May, 2012 06:40 AM

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?

  1. 1 Posted by chris on 25 May, 2012 06:40 AM

    chris's Avatar

    PHP

  2. 2 Posted by chris on 25 May, 2012 06:42 AM

    chris's Avatar

    It's obviously JSON or a complex array because trying to read the variable normally yields nothing.

  3. 3 Posted by Alex on 25 May, 2012 09:45 AM

    Alex's Avatar

    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. 4 Posted by chris on 25 May, 2012 02:10 PM

    chris's Avatar

    Sorry, late night frustration. Won't happen again. Thanks for the tip, works great!

  5. Marc Guyer closed this discussion on 25 May, 2012 02:23 PM.

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

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM