The first thing to do is to make sure your husbandry is correct. Make sure you are using accurate digital thermometers with probes to measure temps. Make sure you have nice tight fitting hides so your snake feels safe.

If your snake feels very safe, it is much more likely to eat. If all the basic husbandry is figured out, try holding out on the snake for two weeks. The hungrier they are between offerings, the more likely they are to eat.

The other methods people have suggested are also good ideas