It is suggested that you clearly inform the teacher of your intention through language or words before you put money in order to avoid misunderstanding and unnecessary confusion. If you don't have a tacit understanding, or the teacher is confused by your hints, you'd better communicate directly and make your thoughts clear. This will ensure that your intentions are accurately conveyed, and also help to strengthen communication and trust between you.