We were in Hanoi at the end of August 2012, and successfully got our visa for China in 3 days for $30 US each. Was a single entry, 30 day visa (one Australian passport, one UK).
I found alot of the advice online very conflicting, so just wanted to let people know it can be done yourself via the chinese embassy in hanoi, and it was not difficult.
The embassy is open 8.30-11.30 weekdays.On arrival a man gave us copies of the paperwork we needed to fill out. We took with us photocopies of our passport and vietnamese visa, a passport photo, details of our travel insurance, a copy of our flight home to australia, a print out of booking confirmation of our first hotel we were staying at. We also had to fill out the names of 4 hotels we were staying at, and give them an idea of our itinery (we just chose 4 places from the lonely planet).
We were there on a Monday morning, and were able to come back and pick it up on a Thursday. If we wanted to we could have paid a bit more and got it done faster, in 1-2 days.
You have to pay for your visa in US dollars. The lady at the embassy gives you a ticket with your application number on it, and you have to take it to a specific bank about 3km from the embassy. You pay your money there, get your ticket stamped by them, then bring it back to the embassy when you pick up your visa as proof that you have paid. They give you a copy of the name of the bank with the address, so you can get a taxi if you want. (we just walked!)
We were able to do a trip out to Halong Bay while we were waiting for our Chinese visa to be processed, so didn't have to hang around waiting in Hanoi. We just checked with the tour company that they were happy to just have a photocopy of our passports and vietnamese visa, and it was fine.
I have read alot about people getting agencies to do your Chinese visa for you- we wanted to do it ourselves because we had quite a few dodgy experiences with tour places in vietnam, so weren't really keen to hand over our passports for an extended period! I read some agencies will charge quite alot of money and some take upto 6 days, so we were quite happy to do it ourselves. It was not difficult, would recommend others to just do it yourself!