[insert_php]
$admin­Mail = ‘t.velechovsky@staygroup.cz,dtsprague.transport@gmail.com, karolina.sebkova@downtownsuites.cz, info@downtownsuites.cz’;
//$adminMail = ‘adam.kurek@centrum.cz’;

define(“MERCHANT_NUMBER”, “19320212”);
define(“PRIVATE_KEY”, “./brana_gp/key/gpwebpay-pvk.key”);
define(“PRIVATE_KEY_PSW”, “Fena123.”);
define(“PUBLIC_GP_KEY”, “./brana_gp/key/gpe.signing_prod.pem”);
define(“GP_URL”, “https://3dsecure.gpwebpay.com/pgw/order.do”);

require_once “./brana_gp/globals.php”;
define(“SAVE_SIGNATURE_TO_FILE”, fal­se);
define(“SAVE_SIGNATURE_DIR_PATH”, “./brana_gp/sign/”);
define(“SAVE_SIGNATURE_FILE_PATH”, “./brana_gp/sign/@YM@/signature.@ORDERID@.sign”);
define(“SAVE_SIGNATURE_FILE_PATH_ENCODED”, “./brana_gp/sign//@YM@/signatureEnc.@ORDERID@.sign”);
define(“CURRENCY”, 978);// 978 EUR
define(“ONE_WAY_PRICE”, 3500);
define(“RETURN_PRICE”, 5900);
//define(“ONE_WAY_PRICE”, 50);
//define(“RETURN_PRICE”, 100);
require_once “./brana_gp/signature.php”;
$sign = new CSignature(PRIVATE_KEY, PRIVATE_KEY_PSW, PUBLIC_GP_KEY);
if (isset($_GET[“action”])) {
try {
if ($_GET[“action”] == “suc­cess”) {
echo ”

Your order has been suc­cess­fully paid.

Thank you.
Pay­ment ID: ” . $_GET[“payment”] . “
Order ID:” . $_GET[“order”] . ”

;
}
if ($_GET[“action”] == “respon­se” || $_GET[“action”] == “respon­seMps”) {
require_once “./brana_gp/response.php”;
echo “”;
if ($diges­tok == “1” && $prco­de == “0”) {
wp_mail($adminMail, ‘TRANSPORT — PAID’,
“Trans­port Zapla­cen
Čís­lo plat­by: $order­num­ber
Čís­lo objed­náv­ky: $meror­der­num­ber
Code: $prco­de ($result­text)
Info: $md
“,array(‘Content-Type: text/html; charset=UTF-8’,‘From: City West Apart­ments’));
echo “

;
die();
} else {
echo ”

Some­thing went wrong: $result­text
Pay­ment error code: PRCODE=$prcode, SRCODE=$srcode

;
}
}
} catch (Excep­ti­on $e) {
//die(“Something went wrong: ” . $e->getMessage());
die(“Something went wrong”);
}
} else if (!empty($_POST[“nf-field-49”])) try {
$data = “”;
$get = “”;
$flag = “0”;
$desc = substr(“” . $_POST[“nf-field-41”] . “|” .
“” . $_POST[“nf-field-42”] . “|” .
“” . $_POST[“nf-field-43”] . “|” .
//“Amount: “.$_POST[“nf-field-31”].” \n”.
//“Arrival : “.$_POST[“nf-field-33”].” \n”.
//“A_FN.: “.$_POST[“nf-field-34”].” \n”.
//“Departure: “.$_POST[“nf-field-35”].” \n”.
//“D_FN: “.$_POST[“nf-field-36”].” \n”.
//“Type: “.$_POST[“nf-field-38”].” \n”.
//“Dest: “.$_POST[“nf-field-39”].” \n”;
“”, 0, 200);
$poce­tO­sob = (float)$_POST[“nf-field-44”];
$batch_size = (float)4;

if ($_POST[“nf-field-49”] == “One way”) $pri­ce = ONE_WAY_PRICE;
else if ($_POST[“nf-field-49”] == “Return”) $pri­ce = RETURN_PRICE;
else $pri­ce = 0;
$pri­ce = (ceil($pocetOsob / $batch_size)) * $pri­ce;

if (!isset($orderId)) $orde­rId = (int)(microtime(true) * 100);
if (!isset($merordernum)) $meror­der­num = $orde­rId — 1;
if (!isset($merchantId)) $mer­chan­tId = MERCHANT_NUMBER;
if (isset($HTTPS) && $HTTPS == ‘on’) {
$pro­to­kol = “htt­ps”;
} else {
$pro­to­kol = “http”;
}
$ope­ati­on = “CREATE_ORDER”;
$mer­chan­tId = trim($merchantId);
$_SESSION[‘merchantId’] = $mer­chan­tId;
$data .= “$merchantId|$opeation”;

if (isset($source) && $sour­ce == “fina­li­ze”) {
$ope­ati­on = “FINALIZE_ORDER”;
$data = “$merchantId|$opeation|$orderId|$price”;
$get = “MERCHANTNUMBER=” . urlencode(trim($merchantId)) . “&OPERATION=$opeation&ORDERNUMBER=” . urlencode($orderId) . “&AMOUNT=” . trim($price);
$url = trim(“$protokol://$SERVER_NAME” . $_SERVER[“REQUEST_URI”] . “?action=responseMps”);
$data .= “|$url”;
$get .= “&URL=” . urlencode($url);
} else {
$data .= “|$orde­rId”;
$data .= “|” . trim($price);
$data .= “|” . CURRENCY;
$get .= “&CURRENCY=” . CURRENCY;

$data .= “|$flag”;
$data .= “|$meror­der­num”;

$get = “MERCHANTNUMBER=” . urlencode(trim($merchantId)) . “&OPERATION=$opeation&ORDERNUMBER=” . urlencode($orderId)
. “&AMOUNT=” . trim($price) . “&DEPOSITFLAG=$flag”;

$get .= “&CURRENCY=” . CURRENCY;

$meror­der­num = trim($merordernum);

$get .= “&MERORDERNUM=” . urlencode(trim($merordernum));

if (isset($source) && $sour­ce == “wallet”) {
$url = trim(“$protokol://$SERVER_NAME” . $_SERVER[“REQUEST_URI”] . “?action=responseMps”);
} else {
$url = trim(“$protokol://$SERVER_NAME” . $_SERVER[“REQUEST_URI”] . “?action=response”);
}
$data .= “|$url”;
$get .= “&URL=” . urlencode($url);

$desc = trim($desc);
$desc = htmlentities($desc);
$data .= “|$desc”;
$get .= “&DESCRIPTION=” . urlencode(trim($desc));

$md = substr(“” . $_POST[“nf-field-41”] . “|” .
“” . $_POST[“nf-field-42”] . “|” .
“” . $_POST[“nf-field-43”] . “|” .
//“Amount: “.$_POST[“nf-field-31”].” \n”.
//“Arrival : “.$_POST[“nf-field-33”].” \n”.
//“A_FN.: “.$_POST[“nf-field-34”].” \n”.
//“Departure: “.$_POST[“nf-field-35”].” \n”.
//“D_FN: “.$_POST[“nf-field-36”].” \n”.
//“Type: “.$_POST[“nf-field-38”].” \n”.
//“Dest: “.$_POST[“nf-field-39”].” \n”;
“”, 0, 180);
$md = trim($md);
$md = htmlentities($md);
$data .= “|$md”;
$get .= “&MD=” . urlencode(trim($md));

}
$pay­mu­zo = GP_URL;
if (!isset($paymuzo) || trim($paymuzo) == “” || trim($paymuzo) == “|”) {
$popis[] = “Neni zada­na adre­sa ser­ve­ru / Tar­get ser­ver not set”;
$pay­mu­zo = “|”;
} else {
$_SESSION[‘paymuzo’] = $pay­mu­zo;
$split = explo­de(“|”, $pay­mu­zo, 2);
if (sizeof($split) >= 1) {
$pay­mu­zo = $split[0];
}
}
unset($_SESSION[“source”]);

unset($_SESSION[“paymethod”]);
unset($paymethod);
unset($_SESSION[“itemIds”]);
unset($itemIds);
unset($_SESSION[“vUsed”]);
unset($vUsed);
unset($_SESSION[“sUsed”]);
unset($sUsed);
unset($_SESSION[“hUsed”]);
unset($hUsed);
unset($_SESSION[“rShipping”]);
unset($rShipping);
unset($_SESSION[“rLoyality”]);
unset($rLoyality);
unset($_SESSION[“sRestriction”]);
unset($sRestriction);
unset($_SESSION[“rDeferredAuthorization”]);
unset($rDeferredAuthorization);
unset($_SESSION[“rDeAuthAuto”]);
unset($rDeAuthAuto);
unset($_SESSION[“rDeAuthAutoAmnt”]);
unset($rDeAuthAutoAmnt);

unset($_SESSION[“useCart”]);
$_SESSION[‘cesta’] = $pay­mu­zo;

$sig­na­tu­re = $sign->sign($data);

if (defined(“SAVE_SIGNATURE_TO_FILE”) && SAVE_SIGNATURE_TO_FILE) {
$file­Pa­th = (defined(“SAVE_SIGNATURE_FILE_PATH”) && trim(SAVE_SIGNATURE_FILE_PATH) != “”) ? strftime(SAVE_SIGNATURE_FILE_PATH) : “signature.sign”;
if (strpos($filePath, “@ORDERID@”) !== fal­se) {
$file­Pa­th = str_replace(“@ORDERID@”, $orde­rId, $file­Pa­th);
}
$fol­der­Path = SAVE_SIGNATURE_DIR_PATH . date(‘Ym’) . “/”;
if (!file_exists($folderPath)) {
mkdir($folderPath);
}
$file­Pa­th = str_replace(“@YM@”, date(‘Ym’), $file­Pa­th);
$f = fopen($filePath, “w”);
fwrite($f, $sig­na­tu­re);
fclose($f);
$file­Pa­th = (defined(“SAVE_SIGNATURE_FILE_PATH_ENCODED”) && trim(SAVE_SIGNATURE_FILE_PATH_ENCODED) != “”) ? strftime(SAVE_SIGNATURE_FILE_PATH_ENCODED) : “signatureEnc.sign”;
if (strpos($filePath, “@ORDERID@”) !== fal­se) {
$file­Pa­th = str_replace(“@ORDERID@”, $orde­rId, $file­Pa­th);
}
$file­Pa­th = str_replace(“@YM@”, date(‘Ym’), $file­Pa­th);
$f = fopen($filePath, “w”);
fwrite($f, urlencode($signature));
fclose($f);
}
$get .= “&DIGEST=” . urlencode($signature);
$path = $pay­mu­zo . “?” . $get;

wp_mail($adminMail, ‘TRANSPORT’,

Zalo­že­na objed­náv­ka
Čís­lo plat­by: $orde­rId
Čís­lo objed­náv­ky: $meror­der­num
Část­ka: ” . (int)($price / 100) . “EUR
Infor­ma­ce k Trans­por­tu:
Jmé­no: ” . $_POST[‘nf-field-41’] . ”
Email: ” . $_POST[‘nf-field-42’] . ”
Tele­fon: ” . $_POST[‘nf-field-43’] . ”
Počet lidí: ” . $_POST[‘nf-field-44’] . ”
Pří­let: ” . $_POST[‘nf-field-45’] . ”
Čís­lo letu: ” . $_POST[‘nf-field-46’] . ”
Odlet: ” . $_POST[‘nf-field-47’] . ”
Čís­lo letu: ” . $_POST[‘nf-field-48’] . ”
Typ: ” . $_POST[‘nf-field-49’] . ”
Loka­li­ta: City West Apart­ments
“,array(‘Content-Type: text/html; charset=UTF-8’,‘From: City­West Apart­ments’));

wp_mail(str_replace([“;”,”,”],””,$_POST[‘nf-field-42’]), ‘City West Apart­ments Trans­port Order Recap’,

Trans­por­tati­on order has been sub­mit­ted. This email is gene­ra­ted befo­re pay­ment.

Thank you for your order.
We will con­tact by the e-mail you indi­ca­ted with further details con­cer­ning trans­port.
If you have any ques­ti­ons or spe­cial needs, feel free to con­tact us at citywestapartments.cz

Best Regards

info@citywestapartments.cz
www.citywestapartments.cz
Tel. +420 770 10 20 20

Infor­mati­on Recap:
Order Num­ber: $meror­der­num
Total: ” . (int)($price / 100) . “EUR
Name: ” . $_POST[‘nf-field-41’] . ”
Email: ” . $_POST[‘nf-field-42’] . ”
Tele­pho­ne: ” . $_POST[‘nf-field-43’] . ”
Peo­ple: ” . $_POST[‘nf-field-44’] . ”
Arri­val date: ” . $_POST[‘nf-field-45’] . ”
Fli­ght no.: ” . $_POST[‘nf-field-46’] . ”
Depar­tu­re date: ” . $_POST[‘nf-field-47’] . ”
Fli­ght no.: ” . $_POST[‘nf-field-48’] . ”
Locati­on: City West Apart­ments
“,array(‘Content-Type: text/html; charset=UTF-8’,‘From: City­West Apart­ments’));

echo ”

If you are not direc­ted to pay­ment gateway, follow this link GP Web­Pay

;
} catch (Excep­ti­on $e) {
//die(“Something went wrong: ” . $e->getMessage());
die(“Something went wrong”);
}
[/insert_php]

Transportation Package


FROM AIRPORT TO CITY WEST Apar­ments AND BACK

Our dri­ver will be wai­ting for you out­si­de of the secu­red area of the arri­val
ter­mi­nal at Vac­lav Havel Air­port Pra­gue 15 minu­tes after your lan­ded accor­ding to the offi­cial lan­ding infor­mati­on pro­vi­ded by the Air­port autho­ri­ties and will be wai­ting for 20 minu­tes maxi­mum. If your pla­in is dela­yed ple­a­se let us know
imme­di­a­te­ly to make sure we will pick you up later. Once pic­ked up, our dri­ver will take you direct­ly to your pre­ferred accpm­p­dati­on in Pra­gue city ceter.

Our dri­ver will pick you up at your pre­ferred accom­mo­dati­on in Pra­gue and take you back to the Vac­lav Havel Pra­gue Air­port. Ple­a­se note, that in the rush hour it can take more than 1 hour to get to the air­port and we recom­mend sche­du­ling your pick up at the hotel at least 3 hours befo­re your fli­ght depar­tu­re.

Do you want to get a ride?

Trans­por­tati­on form