iPhone 6s camera replacement I dropped my iPhone and shattered the external lens. The internal one was scratched, too.

I got the parts online and followed the iFixit guide to open up my iPhone and replace the camera. Now when I to the Camera app I only capture the top pixels.  The photos come out like the image below.  Do you think I got a defective camera unit or am I missing something?
Here's what I would do, in order:


Restart the iPhone
Open the iPhone up, disconnect the camera, and reconnect it
Clean the contacts on the logic board with isopropyl alcohol (with the battery disconnected, of course)
Return the camera and get a new one from a different source


Also, I don't know from where you ordered the camera, but if you have to return it and get a new one, don't just buy the cheapest thing you see. Try to find a seller from your country that cares enough to post real photos of the camera instead of those stock photos and buy one from them.

If the next one still doesn't work, you could try one more from another seller, but if it still doesn't work, then it's the almost certainly the iPhone at fault and about the only thing to do would be get another one if you want the camera fixed.