Generosity with the expectation of getting something in return is he same as not giving at all. Both are selfish attitudes.
You need to give without any self-concern whatsoever -- no expectation of any return. You have to love the other person as yourself and to wish for them everything that they desire. When you do this, the greater "you" (God) receives for all of its parts (you, him, her).
The difference is in the attitude. One is called Ego (self-concern); the other is called Altruism (Love).
When I have experienced this, miracles happened, like those of Moses parting the sea and Peter walking on water. Forgiveness of the assaults of others became effortless and forgetting their trespass became natural, because I had taken 100% responsibility for their actions.
Even the "self worth way" that SilentMagenta talks about is self-ish (self-concerned, egoistic). Even those who give anonymously and receive self-satisfaction are being egoistic and destructive.
For most, the needed transformation cannot happen all at once, but they must take each selfish desire and convert it into an altruistic, selfless desire.
For those who are ready for such a spiritual transformation -- what Jesus called being "born again" of the spirit, the following short video might be of interest.