}
     } else {
         $ticket->Extends = "";
     }
 }
 if (!empty($CONFIG["db"]["cct"][$_POST["form_voucher_type"]])) {
     $ticket->Language = $DEFAULT_BROWSER_LANGUAGE;
     $ticket->ChatSessionsMax = $CONFIG["db"]["cct"][$_POST["form_voucher_type"]]->ChatSessionsMax;
     $ticket->ChatTimeMax = $CONFIG["db"]["cct"][$_POST["form_voucher_type"]]->ChatTimeMax * 60;
     $ticket->Price = $CONFIG["db"]["cct"][$_POST["form_voucher_type"]]->Price;
     if (!empty($CONFIG["gl_ccsv"])) {
         $ticket->VAT = round($CONFIG["db"]["cct"][$_POST["form_voucher_type"]]->Price * $CONFIG["gl_ccva"] / 100, 2);
     }
     $ticket->CurrencyISOThreeLetter = $CONFIG["db"]["cct"][$_POST["form_voucher_type"]]->CurrencyISOThreeLetter;
     $ticket->Save();
     $ticket->SendCreatedEmail();
 }
 $html = getFile(PATH_TEMPLATES . "payment/paypal.tpl");
 $html = str_replace("<!--account-->", $CONFIG["db"]["ccpp"]["PayPal"]->Account, $html);
 $html = str_replace("<!--price-->", $_POST["form_total_price"] - $_POST["form_vat"], $html);
 $html = str_replace("<!--tax-->", $_POST["form_vat"], $html);
 $html = str_replace("<!--currency-->", $_POST["form_currency"], $html);
 $html = str_replace("<!--user_id-->", $_POST["form_visitor_id"], $html);
 $html = str_replace("<!--order_id-->", $ticket->Id, $html);
 $html = str_replace("<!--voucher_id-->", base64UrlEncode($ticket->Id), $html);
 $html = str_replace("<!--server-->", LIVEZILLA_URL, $html);
 $ofc = !empty($_POST["form_ofc"]) ? "&amp;ofc=MQ__" : "";
 if (!empty($_POST["form_extends"]) && !empty($_POST["form_group"])) {
     $html = str_replace("<!--co-->", "&amp;co=" . base64UrlEncode($_POST["form_extends"]) . "&amp;intgroup=" . base64UrlEncode($_POST["form_group"]) . $ofc, $html);
 } else {
     if (!empty($_POST["form_group"])) {