Custom Purchase Review

[php]
if(isset($_POST[‘upgrade_key’])) {
$upgrade_key=(isset($_POST[‘upgrade_key’])) ? $_POST[‘upgrade_key’] : -1;
}
if(isset($_GET[‘upgrade_key’])) {
$upgrade_key=(isset($_GET[‘upgrade_key’])) ? $_GET[‘upgrade_key’] : -1;
}

$total_amount = 0;
$vdv_version_amount = 0;
$discount = 0;
$description =””;

//Fyrir Upgrade er notað 0 í aftasta dálk
//Fyrir Custom Purchase er notað 1 í aftasta dálki
//Fyrir Subscription er notað 2 í aftasta dálki
//syntax for upgrade array: (vdv_version(base, standard,pro,extra_sites),discount_type($%),discount,multiplier_sites,text,custom)
//version=5 notað til að borga fasta upphæð

$upgrade_key_array = array (
“VDV-PRO” => array(5,””,1320,”1 year of VDV Professional Support Subscription”,2),
“VDV-STANDARD” => array(5,””,720,0,”1 year of VDV Standard Support Subscription”,2),
“VDV-ENTERPRISE” => array(5,””,2520,”1 year of VDV Enterprise Support Subscription”,2),
“VDV-ENTERPRISEPLUS” => array(5,””,5040,0,”1 year of VDV Enterprise Plus Support Subscription”,2),
“VDV-2200″ => array(5,””,2200,0,”Data hosting for 2015″,1),
“VDV-TW1800″ => array(5,””,1800,0,””,1),
“VDV-CRC1300″ => array(5,””,1300,0,””,1),
“VDV-CRC1400″ => array(5,””,1400,0,””,1),
“VDV-CRC1500″ => array(5,””,1500,0,””,1),
“VDV-CRC1800″ => array(5,””,1800,0,””,1),
“VDV-CRC1950″ => array(5,””,1950,0,””,1),
“VDV-CRC2200″ => array(5,””,2200,0,””,1),
“VDV-CRC2300″ => array(5,””,2300,0,””,1),
“VDV-gecko” => array(5,””,410,0,”500 VDV Days”,1),
“VDV-PES” => array(5,””,8286,0,”Cayuga Project, Engineering Testing, through 31-May2016″,1),
“VDV-RioTinto” => array(5,””,440,0,”10 Extra Sites”,1),
“VDV-Gecko” => array(5,””,410,0,”500 VDV Days”,1),
“VDV-NIST” => array(5,””,1500,0,”Extended MySQL”,1),
“VDV-Algoritmos” => array(5,””,3800,0,”VDV Classic”,1),
“VDV-AET” => array(5,””,822,0,”Station D Initial cost and hosting for 1 July 2015 to 1 Oct 2015″,1),
“VDV-Dynaopt” => array(5,””,1806,0,”VDV Classic-1000Days+Initial Fee”,1),
“VDV-Rapid” => array(5,””,260,0,”Gmap toolkit”,1),
“VDV-Woolpert” => array(5,””,1550,0,”50 Extra Sites”,1),
“VDV-minne87Yj” => array(5,””,960,0,”VDV Subscription”,1),
“VDV-Hydroterra987i” => array(5,””,5500,0,”VDV-1500 Custom License”,1),
“VDV-Braun43yj” => array(5,””,510,0,”Displacement Graph Toolkit”,1),
“VDV-m8ju3″ => array(5,””,500,0,”VDV 90day keys”,1),
“VDV-Brauni8jZ” => array(5,””,5800,0,”VDV Enterprise Upgrade”,1),
“VDV-UWISP” => array(5,””,260,0,”VDV File Converter”,1),
“VDV-WIStevens” => array(5,””,2706,0,”VDV Pro Upgrade”,1),
“VDV-STOLLER87hj” => array(5,””,1500,0,”MySQL Extended license”,1),
“VDV-Kameh8j7rt” => array(5,””,1200,0,”12 months of Data Hosting”,1),
“VDV-UNM” => array(5,””,208,0,”VDV File Converter”,1),
“VDV-antamina” => array(5,””,3760,0,”Premium Subscription plus Support”,1),
“VDV-braun” => array(5,””,260,0,”VDV File Converter”,1),
“VDV-6hsihr7″ => array(5,””,5490,0,”VDV Pro + 10 sites”,1),
“VDV-UMN2014PRO” => array(5,””,960,0,”VDV Pro Subscription for VDV Pro 2014 Update”,1),
“VDV-DRI” => array(5,””,7350,0,”6xVDV Pro Sub + 5xExtended MySQL licence”,1),
“VDV-Ludek” => array(5,””,600,0,”One year Professional Service Subscription on half price”,1),
“VDV-CTUP” => array(5,””,700,0,”Vista Data Vision Standard 2014 update”,1),
“VDV-boztek” => array(5,””,1200,0,”1/4 of two Enterprise Service Subscriptions”,1),
“VDV-GRUNER” => array(5,””,3000,0,”200 Extra Sites with 50% discount”,1),
“VDV-ittechPO” => array(5,””,700,0,”VDV Standard Update”,1),
“VDV-ORNL” => array(5,””,1800,0,”Quote VDV-02330″,1),
“VDV-ASC” => array(5,””,2010,0,”100 additional sites for T&B Systems “,1),
“VDV-QuantificPO” => array(5,””,2160,0,”VDV Standard”,1),
“VDV-UNICY” => array(5,””,2800,0,”VDV Pro+VDV FC+20 extra sites”,1),
“VDV-Swiss” => array(5,””,525,0,”VDV Displacement Graph Toolkit”,1),
“VDV-Kamehameha” => array(5,””,3960,0,”VDV Hosting 1-Jul-2015 to 30-Jun-2018″,1),
“VDV-NORTHWEST” => array(5,””,2500,0,””,1));

//if($vdv_version!=-1)
if(array_key_exists($upgrade_key, $upgrade_key_array))
{
$upgrade_key_info = $upgrade_key_array[$upgrade_key];

$vdv_version = $upgrade_key_info[0];
$discount_type = $upgrade_key_info[1];

if($vdv_version==1)
{
$version_str = “Base”;
$total_amount += 325;
$vdv_version_amount = 325;
}
else if($vdv_version==2)
{
$version_str = “Standard”;
$total_amount += 630;
$vdv_version_amount = 630;
}
else if($vdv_version==3)
{
$version_str = “Professional”.$upgrade_key_info[4];
$total_amount += 1630;
$vdv_version_amount = 1630;
}
else if($vdv_version==4)
{
$extra_sites = $upgrade_key_info[3];
$sites_price = 750;
$sites_cost = $sites_price*$extra_sites;

$version_str = ($extra_sites*100).” Extra Sites”;
$total_amount += $sites_cost;
$vdv_version_amount = $sites_cost;
}
else if($vdv_version==5)
{
$version_str = $upgrade_key_info[4];
$total_amount = $upgrade_key_info[2];
$vdv_version_amount = $upgrade_key_info[2];
}

//if($discount_type!=0)
//{
if($discount_type==”US$”)
{
$discount = $upgrade_key_info[2];
$total_amount = floor($total_amount-$discount);
//$discount_str = $upgrade_key_info[$version_index].$upgrade_key_info[1];
}
else if($discount_type==”%”)
{
$discount = ceil($total_amount*($upgrade_key_info[2]/100));
$total_amount = floor($total_amount-$discount);
//$discount_str = $upgrade_key_info[$version_index].$upgrade_key_info[1];
}
//}

if($total_amount==666)
{$total_amount = 665;}

if($upgrade_key_info[5]==0)//Upgrade
{
$description .= “Vista Data Vision “.$version_str.” Version Upgrade[br/]”;

echo”

Vista Data Vision Purchase

Upgrade Version: VDV $version_str“;

$description .= “Upgrade Key: $upgrade_key”;
echo”[br/]
Upgrade Key: $upgrade_key“;
if($discount>0)
{echo”[br/][br/]Discount: $discount US$“;}

}
else if($upgrade_key_info[5]==1)//Custom Purchase
{
$description .= “Vista Data Vision [br/] $upgrade_key_info[4]”;
echo “[h3 style=\”font-weight:bold\”]Vista Data Vision Purchase – Review Order[/h1]”;
echo “Upgrade Key: $upgrade_key“;
echo “[br/]”;
echo “Items: $upgrade_key_info[4]“;
}
else if($upgrade_key_info[5]==2)//Subscription Purchase
{
$description .= “Vista Data Vision [br/] $upgrade_key_info[4]”;
echo ”
“;
echo ”

$upgrade_key_info[3]

“;
}

echo”
[p style=\”font-size: 14px;\”]Total Price: $total_amount US$[/p]
No VAT is added.
[/p]”;

// Data received from Korta, you get them when you have applied with KORTA !
$merchant = ‘8180633’;
$terminal= ‘7293’;
$secretcode = ‘FfnKaKJfNbtGpsDoxRgjifz3YhBog89bJb5hByt7’;

// Information from your system ! Lines in description are separated by
$amount = $total_amount;
$cur = ‘USD’;
//$description = ”;

// Electronic signature used so that KORTA can confirm that the payment was received from you un-altered !
$checkvaluemd5 = md5(htmlentities($amount . $cur . $merchant . $terminal . $description . $secretcode)) ;

$your_downloadurl = ‘http://vistadatavision.com/purchase-complete/’;

echo”[form name=’vdv_purchase_form’ action=’https://netgreidslur.korta.is/’ method=’post’]
[input type=’hidden’ name=’amount’ value=’$amount’ /]
[input type=’hidden’ name=’currency’ value=’$cur’ /]
[input type=’hidden’ name=’lang’ value=’en’ /]
[input type=’hidden’ name=’merchant’ value=’$merchant’ /]
[input type=’hidden’ name=’terminal’ value=’$terminal’ /]
[input name=’description’ type=’hidden’ value=’$description’]
[input type=’hidden’ name=’checkvaluemd5′ value=’$checkvaluemd5′ /]

[input type=’hidden’ name=’refermethod’ value=’POST’ /]
[input type=’hidden’ name=’refertarget’ value=’_top’ /]
[input type=’hidden’ name=’downloadurl’ value=’$your_downloadurl’ /]
[input onclick=’javascript:document.vdv_purchase_form.submit()’ type=’button’ value=’Continue’]
[/form]”;

echo”

 

In the next step you will be transfered to a Secure Website for web payment.

“;
}
else
{
echo”Notice
To upgrade to version 2014 please contact us at vdv@vistadatavision.com and send us information about your current VDV Product Keys (User, Company & Product Key for db.robot.c, db.data.browser & db.web.browser). We will send you an Upgrade Key that can be used on our secure website to purchase an upgrade for you Vista Data Vision system.

Go back to Upgrade Page

“;
//exit();
}
[/php]