$html = str_replace("<!--voucher_id-->", base64UrlEncode($ticket->Id), $html); $html = str_replace("<!--server-->", LIVEZILLA_URL, $html); $ofc = !empty($_POST["form_ofc"]) ? "&ofc=MQ__" : ""; if (!empty($_POST["form_extends"]) && !empty($_POST["form_group"])) { $html = str_replace("<!--co-->", "&co=" . base64UrlEncode($_POST["form_extends"]) . "&intgroup=" . base64UrlEncode($_POST["form_group"]) . $ofc, $html); } else { if (!empty($_POST["form_group"])) { $html = str_replace("<!--co-->", "&intgroup=" . base64UrlEncode($_POST["form_group"]) . $ofc, $html); } else { $html = str_replace("<!--co-->", $ofc, $html); } } exit($html); } else { if (!empty($_GET["confirm"]) && $_GET["confirm"] == "1" && !empty($_GET["vc"]) && strlen(base64UrlDecode($_GET["vc"])) == 16) { require LIVEZILLA_PATH . "_lib/functions.pp.paypal.inc.php"; $voucher = new CommercialChatVoucher("", base64UrlDecode($_GET["vc"])); if ($voucher->Load()) { if (PayProvValidatePayment($voucher->Price)) { languageSelect($voucher->Language); $voucher->SetPaymentDetails(PayProvGetPaymentId(), PayProvGetPayerId(), PayProvGetPaymentDetails()); if (empty($PAYMENTERROR)) { $voucher->SetVoucherParams(!empty($voucher->Voided), true, false, false, false, true, base64UrlDecode($_GET[GET_EXTERN_GROUP])); } else { $voucher->SetVoucherParams(!empty($voucher->Voided), false, false, false, false); } } } } } unloadDataProvider();