You may also want to try using a timeout between setting the item/quantity and the commit call, it could be an issue where it is trying to source the info it needs when u set the item and the commitLine isnt triggering properly because its not done sourcing.