What prevents their contributions from being accepted is this: They do not truly believe in Allah and His Messenger. They only claim to believe (2:8). They join you in congregations of prayer only half-heartedly and just to be seen of men (4:142), (107:5). And they contribute only with great reluctance in their hearts. (Islam involves only willing submission to Allah (2:256).