the only reasons why their contributions are not accepted are that they reject allah and his messenger that they come to prayer without earnestness and that they offer contributions unwillingly.
وما منعهم أن تقبل منهم نفقاتهم إلا أنهم كفروا بالله وبرسوله ولا يأتون الصلاة إلا وهم كسالى ولا ينفقون إلا وهم كارهون