I've added an additional fee (for prepaid customs and duty) based heavily on this tutorial at excellencemagentoblog.com.
I thought I had it working, but now that a few people are using it in the wild, we've discovered a problem.
When there are other fees outside the ones normally displayed, then the whole collect totals thing breaks. For example, if a merchant uses a cart rule that gives a discount based on subtotal, the discount doesn't show, my fee doesn't show, and the grand total is wrong (it's not the total without the discount and fee, and it's also not the correct total with them).
If I remove the collector from the config.xml, then everything goes back to how it should, but obviously my additional fee doesn't work anymore.
Because of the checkout process followed (programatically created order after 3rd party hosted checkout), I really don't need my additional fee run in the cart or visible in the quote, only in the order views, invoice, etc.
Collect totals is far from my expertise so I appreciate any help. I'm happy to post any code that might help. Just let me know what you'd like to see. most of it follows very closely the tutorial, with just some additional logic to determine the amount and if it applies.