What makes you a happy developer?
Is this a salary? Opportunity to learn something interesting? The atmosphere in the team? Certainly all of these things are important. Lack of any of them will probably result in looking for another job.
Some time ago I discovered another motivating factor. It is a feedback loop, i.e. the customer’s opinion and the use of our solution. I have great satisfaction when I see that my application is “alive” and the client says how much he likes it and how he made his job easier.