storeTrans($transData); if($ack=="SUCCESS"){ // Sale = Funds taken immediately otherwise they may be taken later $orderStatus = ($paymentType == "Sale") ? 3 : 2; // 3 is payment complete, 2 is processing $paymentResult = ($paymentType == "Sale") ? 2 : 3; // Just to confuse matter Al you plonker!! 2 = money taken 3 = money not yet taken (Athorized) $order->orderStatus($orderStatus,$_GET['cart_order_id']); } else { $paymentResult = 1; } session_unset(); ?>