They are somewhat coded, but that is done easily. But you need to get colour code that works for your car (there are a lot of different versions out there!!).I would try to resolder joints (basically doesn't cost you anything) before getting another one.
Yep, resolder joints, also your door lock microswitch(es) may be gone.