To me, if you offer an alternative to the customers that allows both parties to walk away happy, it's not discrimination. To show you what I mean, picture this:
Say a cake shop gets the request to make a dessert for a gay wedding. The owners feel like making the cake is a violation of their religious principles. While they likely can't legally turn down the client, they can explain the situation to them and offer to sell the ingredients to the client and they can make it themselves. That, or discuss a plan that both parties agree with. If the client absolutely refuses to work with them, it's on them. Not the owners.