public static function getEncodedCallback($ipnCallback, $data = array())
    {
        $ret = 'kwf:';
        $data = array(
            'data' => $data,
            'cb' => $ipnCallback
        );
        $data = serialize($data);
        $ret .= substr(Kwf_Util_Hash::hash($data), 0, 10);
        $data = base64_encode($data);
        $ret .= $data;
        if (strlen($ret) > 256) {
            throw new Kwf_Exception("Wirecard custom field does not support more than 256 characters");
        }
        return $ret;
    }