Had done and has done both are correct, but their usage depends on the tense, which you need. If the sentence in the past perfect tense, and you want to say that an action happened before another action in the past, you should use had done, while if the sentence in the present perfect tense, and you want to say that an action happened and completed from a short time, you should use has done.
Examples: He has already done his homework.
He had done his homework, before he went out.