If you have just bought a pet salamander and it is not eating, it is usually because of stress. They are unsure and afraid of the environment they are now in, and no matter how perfect you have made it, they are still unsure of their unfamiliar surroundings. The problem with that is, the more that you try to feed them, the worse it becomes. They do not know who you are, and any change will startle them. The longer that it continues, the worse it becomes, and the more worried you get. That leads you to try and feed them more, thus only resulting in their discomfort getting worse.
So, what do you do to break the cycle? The easiest way is to research their ideal environment and try to mimic it as closely as possible. Leave them in the dark, and only try to feed them at dusk and dawn. Any more than twice a day is too much. Try not to use pincers to feed them, either. The best way that we have found to overcome this not-eating stage is to leave them in the dark, with some waxworms, and let them get them when they are ready. If they do not eat for a very long time, you may need to talk to a vet to see if there are any other issues.