If a player is selected, but is on the Disabled List, they should still receive their bonus. If a player is on the active roster but is "unable" to attend or play, they should not receive their bonus.
The bonus is given because of the fact that if a player is selected it indicates he has performed for his team at an all-star caliber level. Not for playing in the game itself, which does very little for the team paying his contract/bonus.