How to distribute the fee on token swapping?

0

source code:https://github.com/laronlineworld/tokenSwaptoBUSD/blob/main/tokenswap.sol

I have a tokenswap that swap BUSD to erc 1363 token. The problem is, I want to deduct the 3% fee on busd when you swap your busd to erc1363 token. Example:

1 BUSD = 1 Token
1 BUSD minus 3% and 3% will goes to specific address and the remaining busd will also goes to specific address and the 1 Token will goes to the msg.sender that swap his/her busd.

Is anyone can help me with this structure? source code is attached. Thank you