You can try putting the iPhone into DFU mode and see if that will let you restore and remove the jailbreak:
http://www.iclarified.com/entry/index.php?enid=1034
Some jailbreaks cannot be removed and in some cases will permanently disable your iPhone. If that happens to you, then you will may to buy a new iPhone; Apple will provide no support, warranty or out-of-warranty, for a jailbroken iPhone. If the iPhone as advertised by the seller as being officially (or "factory") unlocked, you may have recourse with eBay to force a refund. Otherwise, you may well have to chalk it up to a rather expensive learning opportunity and buy another iPhone; this one from an authorized reseller, I hope.
Good luck.