We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there an easy way to pull out data from a webhook?
Maybe it's me, but I've not found any kind of documentation, example, anything. Not here, not on patreon's api...
I need to create a """"simple"""" script which will do
retrieved data > to variables
if pledge:create do stuff if pledge:delete do stuff if pledge:update do stuff
Is that so hard to achieve?
The text was updated successfully, but these errors were encountered:
Actually there's is a document here: https://docs.patreon.com/#webhooks
You can take from here the idea on how to validate the signature: https://github.com/Patreon/patreon-wordpress/blob/e5c0656b5e0631abbfa93b18ca110c7abd1aafab/classes/patreon_routing.php#L651-L665
And then you can just use this to fetch the json data:
json_decode($raw_post_data, true);
$raw_post_data is the content of the post request as string.
$raw_post_data
I'm posting this now cuz I was having the same issue, but found this solution. Haven't tried it yet, but let me know if it helps :)
Sorry, something went wrong.
Oh, and to check by event you can get the header X-Patreon-Event and check with that, like:
X-Patreon-Event
$type = $headers['X-Patreon-Event']; if($type === 'pledge:create'){ // TODO }
No branches or pull requests
Is there an easy way to pull out data from a webhook?
Maybe it's me, but I've not found any kind of documentation, example, anything.
Not here, not on patreon's api...
I need to create a """"simple"""" script which will do
retrieved data > to variables
if pledge:create do stuff
if pledge:delete do stuff
if pledge:update do stuff
Is that so hard to achieve?
The text was updated successfully, but these errors were encountered: