<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: 			 */
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | Copyright (c) 2004-2010 ARMIA INC                                    |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts VistaCart                     |
// +----------------------------------------------------------------------+
// | Authors: Jipson<jipson.thomas@armiasystems.com>             		  |
// +----------------------------------------------------------------------+
?>

<div align="center" class="subheading">
    <div align="left">Checkout</div>
</div>
<br />
<div align="left" id="item_details_admin">
    <!--items display area start -->
    <div align="center" id="items_display_area_admin">
        <div align="left" class="inner_content_area_admin">
            <?php $session->flash(); ?>
            <form action="https://select.worldpay.com/wcc/purchase" method="post" name="frmPayment" id="frmPayment">
                <input type="hidden" name="instId" value="<?php echo $Instid; ?>">
                <input type="hidden" name="cartId" value="<?php echo $user_id; ?>">
                <input type="hidden" name="amount" value="<?php echo $cartAmount; ?>">
                <input type="hidden" name="currency" value="<?php echo $cnfg["currency"]; ?>">
                <input type="hidden" name="desc" value="Item Purchase with <?php echo $cnfg["site_name"]; ?>">
                <input type="hidden" name="testMode" value="<?php echo $cnfg["worldpay_testmode"]; ?>">
                <input type="hidden" name="name" value="<?php echo $address["fname"] . " " . $address["lname"]; ?>">
                <input type="hidden" name="address" value="<?php echo $address["address"]; ?>">
                <input type="hidden" name="postcode" value="<?php echo $address["zip"]; ?>">
                <input type="hidden" name="country" value="<?php echo $address["country"]; ?>">
                <input type="hidden" name="tel" value="<?php echo $address["phone"]; ?>">
                <input type="hidden" name="email" value="<?php echo $umail; ?>">
                <input type="hidden" name="MC_Shipmethod" value="<?php echo $Shipmethod; ?>">
                <input type="hidden" name="MC_Shipcost" value="<?php echo $Shipcost; ?>">
                <input type="hidden" name="MC_Shipservice" value="<?php echo $Shipservice; ?>">
                <input type="hidden" name="MC_taxamt" value="<?php echo $taxamt; ?>">
                <input type="hidden" name="MC_taxname" value="<?php echo $taxname; ?>">
                <input type='hidden' name='MC_shipping' value='<?php echo $shipping_cost; ?>'>
                <input type="hidden" name="MC_callback" value="<?php echo FULL_BASE_URL . $cnfg["sitebasefolder"] . "/app/webroot/index.php/carts/worldpayback"; ?>">

                <div id="admin_heading">Pay Now</div>
                <div id="grid_admin">
                    <div align="left" id="inner_leftcontent">
                        <p class="maintext_inner">Waiting for the secure payment interface ...</p>
                    </div>
                    <div align="right" id="inner_rightcontent">
                        <span class="toplinks">


                        </span>
                    </div>
                    <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif'); ?></div>
                </div>
                <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif'); ?></div>

                <div id="admin_bottom">
                    <div align="left" id="inner_leftcontent">
                        <p class="maintext_inner">&nbsp;</p>
                    </div>
                    <div align="right" id="inner_rightcontent">
                        <span class="toplinks">		

                            <input type="submit" value="Pay Now" class="buttn_admin">

                        </span>
                    </div>
                    <div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif', array('width' => 1, 'height' => 1)); ?></div>
                </div>
        </div>
        <!--form area end -->
        </form>
    </div>
    <div align="left" class="float_clear1"></div>
</div>
<div align="left" class="float_clear1"><?php echo $html->image('/img/clear.gif'); ?></div>
<script language="javascript" type="text/javascript">
    document.frmPayment.submit();
</script>