I'd say, "That's alright, you really don't have to..." If they're like, "Aw, c'mon, a special treat!" I'd say, "Well, I mean, if you really want to, that's alright, but..." That way you're not taking advantage of them but you're also not denying them making you happy.
I'd do like always. Once a friend and I went to the swimmingpool and she wanted to pay for me. I said she didn't have too. But she wanted and didn't mind. So if people want to pay of kindness, not higher income, I let them.
It depends on the person themselves. Such as, my relationship with them. It also depends on the exact circumstances. I've gone out to places with my friends before and they've had to watch their budget and they worry about not having something to eat because they're a little low, and after some persuasion they let me pay for them. Most insist on paying me back, but I don't mind because me paying for them helps us enjoy our time together and they would do the same for me if they could. A couple even have done the same for me.