The gemara tells that R. Tarfon and R. Chanina would often return the money that he received for pidyon ha'ben (the gemara indicates that there is an advantage to this - קיים זה אף הלכה זו. Rabbeinu Gershom explains that the advantage is to publicize that the halacha allows for the money to be returned. This is similar to what the Rosh explains in Pesachim (Perek 1, 10) that there is an advantage to doing things that are not obviously permitted in order to educate people that it is indeed permitted). The gemara then tells of a situation where someone was hanging around R. Chanina after doing pidyon ha'ben and waiting to get his money back. R. Chanina realized that the person didn't give the money whole heartedly and only gave it because he expected it to come right back. R. Chanina told him that the pidyon ha'ben wasn't effective [Rashi has two versions as to whether it is not effective only if it is returned, or even if it isn't returned. Rabbeinu Gershom and Shulchan Aruch (305:8) assume like the first approach of rashi that so long as it isn't returned, the pidyon ha'ben will be effective. Perhaps after R. Chanina would tell him he can't return the money and the giver would accept that, he would be able to return it].
Tosafos asks that the gemara in Kiddushin says that if one would give pidyon ha'ben to the kohein as a gift with the intent of getting it back, it would be effective. This seems to contradict R. Chanina who held that since the person expected it back, it wouldn't be effective. Tosafos answers that had R. Chanina accepted the money with the intent to return it, as the giver had intended, it would be binding. But, since there is a halacha that a kohein isn't allowed to provide incentive to receive pidyon ha'ben (כהן המסייע בבית הגרנות), R. Chanina didn't receive the money with the intent of returning it. Had both the giver and receiver both intended that it should not be returned, or both intended that it should be returned, the pidyon ha'ben would be effective. The problem in the case of the gemara is that the giver intended to receive it back and the receiver received it without the intent of returning it back. Tosafos question seems to assume that the intent to receive it back should be no worse than the explicit condition to receive it back which is effective.
However, the Gr"a (shulchan aruch 305) points out that according to the Rosh in Succah, Tosafos question doesn't even begin. The Rosh in Succah (3,30) explains that a מתנה על מנת להחזיר is a very specific and rigid agreement that requires a kinyan on the return end as well. It isn't merely an informal assumption that the money will be given back. Therefore, the case of R. Chanina doesn't meet the requirements of a מתנה על מנת להחזיר. When the giver intends to give it for only a short amount of time and then receive it back, it is like a מתנה לזמן, a gift with an expiration date which doesn't qualify as a matana at all and wouldn't work for pidyon ha'ben.