Look, it's close. A good friend doesn't care about your referral fee. He can choose to invite his colleagues to dinner or send small gifts.
The referral fee is not illegal, but the income from one's own labor.