Iphone not charging with charger?

My apple iphone 5 charger stopped working a few weeks ago, so I bought a cheap one from eBay, and now suddenly charging is not supported, why? Also I know it's probably not charging because its not the official charger, and I don't really want to pay £16 for a new one, I got my iphone 5 from carphone warehouse, would they replace it for free by any chance?

Using the generic one that you got on eBay is actually a hazard, almost all of those were recalled by Apple and they are offering a program where I'm in the US for a short period of time where you can bring in your generic charger and they will give you a genuine Apple one for half the price of regular. I do not know if this is world wide or not, but its worth looking into. Also, the iPhone has a 1 year warranty. Apple is generally pretty good about refunding broken products that have a warranty. If you bring it back to your local Apple store, it is likely that they will give you a free replacement.

I firmly agree with Jordan