Skip to content

Instantly share code, notes, and snippets.

@involer
Created April 3, 2016 11:51
Show Gist options
  • Save involer/a6215492de4513df531367078975776d to your computer and use it in GitHub Desktop.
Save involer/a6215492de4513df531367078975776d to your computer and use it in GitHub Desktop.
Webhook Validation
// ksort() and serialize the fields
ksort($fields);
foreach($fields as $k => $v) {
if(!in_array(gettype($v), array('object', 'array'))) {
$fields[$k] = "$v";
}
}
$data = serialize($fields);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment