What I basically have is my own ERC20 smart contract.
I want the following functionality in my smart contract:
A user transfers X amount of an ERC20 token (I can choose/change this token at any time). I process the payment. Based on the amount of the tokens sent to my contract, I send the user Y amount of my own ERC20 token.
Can I code the above functionality as a function in Solidity?