If it's not working, it's about 90% probability you have the thing wired wrong. The other
10% is they sold you a bad part.
Also, note, as G_M indicated in his first post, those small packages sense properly over only
a very short range, a couple of mm. The data sheet will say.
Now, the larger devices will sense over a much longer range, but the following one probably
has pickup to the side directly from the Led. Usually there is a light baffle in between Led
and pickup device.
http://www.cytron.com.my/viewProduct.php?pcode=SN-IRS-01