On the confirm page, there is a block of code that will loop through the cart contents to build up the information that will be sent to the gateway, you would need to edit this loop and create a recordset to lookup the product ID based on the cart ID to get the price from the database.
Just to clarify though, this would not be an issue using Sessions.
Using sessions, the information stored in the cart is stored on the server.
The only information about the session that is stored on the client computer is the session ID.