after entering the 5 digit code, the drivers door will unlock (regardless of whether or not its already unlocked) as a confirmation of the proper code being accepted. if its not doing this, then the numbers are wrong (someone took apart the controller and reprogrammed it), or bad keypad (in theory its possible a bad keypad will still lock the doors but other numbers not work right), or not being entered quickly enough (well, within about 5-8 secs total time for the code).
it could be that the code on the trunk hinge and a couple other places is wrong if the controller has been changed, thats why I mentioned looking at the controller itself.
it is possible to change that code, but requires removing and disassembling and soldering inside the controller to do so.
and since you bought one from a scrap yard I assume (you got a scrapper you said), there is no telling what may have been changed out or isn't working right.