the only reason their contributions are not accepted is that they have denied god and his messenger they come to the prayer half heartedly and they offer contributions unwillingly.
وما منعهم أن تقبل منهم نفقاتهم إلا أنهم كفروا بالله وبرسوله ولا يأتون الصلاة إلا وهم كسالى ولا ينفقون إلا وهم كارهون