i am trying to get a total amount to pay in the instead of 30 i have been left with this as our web designer has left
[php]<?php
include_once(“dbfiles/db1.php”);
$vendor = ‘wizardmotorcycl’;
$key = ‘1056199’;
$live = 100;
function worldpay($orderid) {
global $vendor,$key,$live;
$_SESSION['orderID'] = $orderid;
if ($live) $vspsite="https://secure-test.worldpay.com/wcc/purchase";
else $vspsite="https://secure-test.worldpay.com/wcc/purchase";
$sql = "SELECT * FROM orders1 WHERE id='{$orderid}'";
$result = mysql_query($sql) or die('ERROR:: '.$sql.'<br><br>'.mysql_error());
$sql2 = "SELECT * FROM config WHERE config_id=1";
$result2 = mysql_query($sql2) or die('ERROR:: '.$sql.'<br><br>'.mysql_error());
if (mysql_num_rows($result)==1 && mysql_num_rows($result2)==1) {
$order = mysql_fetch_assoc($result);
$config = mysql_fetch_assoc($result2);
$data = array(
'VendorTxCode'=>$order['id'],
'Amount'=>number_format($order['grandtotal'],2,".",""),
'Currency'=>'GBP',
'Description'=>$config['store_name'].' Order',
'SuccessURL'=>'http://'.$_SERVER['HTTP_HOST'].str_replace('checkout','transok',$_SERVER['REQUEST_URI']),
'FailureURL'=>'http://'.$_SERVER['HTTP_HOST'].str_replace('checkout','transnotok',$_SERVER['REQUEST_URI']),
'CustomerEmail'=>$order['email'],
'VendorEmail'=>$config['store_owner_email_address'],
'CustomerName'=>$order['title']." ".$order['forename']." ".$order['surname'],
'DeliveryAddress'=>$order['d_street_address1']." ".$order['d_street_address2'],
'DeliveryPostCode'=>$order['postcode'],
'BillingAddress'=>$order['cardaddress'],
'BillingPostCode'=>$order['cardpostcode'],
'ContactNumber'=>$order['dayphone']
);
$crypt = base64Encode(SimpleXor(formatData($data),$key));
?>
<form action='https://secure-test.worldpay.com/wcc/purchase' method=post>
<script>
window.onload=function() {
setTimeout("document.Worldpay.submit()",3000);
}
</script>
<?php[/php]