You're missing something--did he ASK you to do the job, or did you just do it yourself, hoping he'd pay you?
If it's the former, then he's an ass. But if it's the latter, sorry, but that's the risk you take. You can't ask people to pay for something they may not have wanted. I personally could not afford to pay someone to do something I could do myself--although had it been me, I would have told you to stop as soon as I realized it, to save you the trouble.