This question already has an answer here:
How would I go about making sure users of a DApp can only interact with the contract using a specific ERC20 token?
For example, say a user has Ethereum, Token 1, and Token 2 in their wallet. The DApp uses Token 2. How can I make it so if they send anything other than Token 2 to the DApp contract, they are refunded.