He gave charity because he felt embarrassed in front of his boss at work
Question

I gave money to a charitable project because I felt scared of my boss at work. If it had been up to me I would not have given even a penny. Will I have the complete reward for this action just as I would if I had given willingly and by my own choice? Please answer with evidence (daleel).
Praise be to Allah.If the situation is as you described, then you will not be rewarded for this donation, because you did not give it for the sake of Allaah, rather you gave it for the sake of your boss because you were afraid of him. It was narrated that the Messenger of Allaah (peace and blessings of Allaah be upon him) said: “Actions are but by intention and each man will have but that which he intended.” (Narrated by al-Bukhaari in Bad’ al-Khalq and Muslim in al-Imaarah, no. 1907).