$eticket = new CommercialChatVoucher("", $ticket->Extends); if ($eticket->Load()) { if (!empty($eticket->Extends)) { $ticket->Extends = $eticket->Extends; } } 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 = $ticket->GetVAT(); } $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"]) ? "&ofc=MQ__" : "";