You should collect totals at some point. I'm not sure where did you get the code to create the orders, but this guide is quite useful and worked for me in the past. Anyway try
$quote->collectTotals()->save();
after you get the quote from the sessionadd your products to cart.