Shipping Method addition is happening as it should be. But, Shipping Rate as per the Shipping method or, custom Shipping rate is not getting added to the order.
$address = $quoteObj->getShippingAddress ();
$address->setCollectShippingRates ( true )->collectShippingRates()
->setShippingMethod('flatrate_flatrate');
$quoteObj->collectTotals ()->save ();
Searching through some other questions I found a solution which adds Custom Shipping Rate to the order, but it doesn't add the shipping rates to Grand Total.
$shippingprice = 0.9;
$orderObj->setShippingAmount($shippingprice);
$orderObj->setBaseShippingAmount($shippingprice);
Best Answer
Try this: