public static function getWebhookPayload($returnObject = false) {
        $data = file_get_contents("php://input");
        if ($data) {
            return self::jsonDecode($data, !$returnObject);
        } else {
            return null;
        }
    }
public static function getWebhookPayload($returnObject = false) {
        $data = file_get_contents("php://input");
        if ($data) {
            return self::jsonDecode($data, !$returnObject);
        } else {
            return null;
        }
    }
public static function getWebhookPayload ( $ returnObject = false ) { $ data = file_get_contents ( "php://input" ) ; if ( $ data ) { return self :: jsonDecode ( $ data , ! $ returnObject ) ; } else { return null ; } }
read and decode the json payload from a webhook's POST request.

@param bool $returnObject    flag to indicate if an object or associative array should be returned
@return mixed|null
@throws \Exception
read and decode the json payload from a webhook s POST request .