DrewM\MailChimp\Webhook::processWebhook PHP Method

processWebhook() private static method

Process the raw request into a PHP array and dispatch any matching subscription callbacks
private static processWebhook ( string $input ) : array | false
$input string The raw HTTP POST request
return array | false An associative array containing the details of the received webhook
    private static function processWebhook($input)
    {
        self::$receivedWebhook = $input;
        parse_str($input, $result);
        if ($result && isset($result['type'])) {
            self::dispatchWebhookEvent($result['type'], $result['data']);
            return $result;
        }
        return false;
    }