Hello, you are unlikely to be infected with hepatitis B. As long as there is no wound on your foot and the needle doesn't stick to your skin, you won't be infected. However, this situation belongs to dangerous surface contact, and it is recommended to deal with it in time.
Suggestion:
I suggest you not to be nervous. Wash your feet with clean water or soapy water in time. If there is no wound on the foot, there should be no chance of infection. Wash socks and shoes that come into contact with liquids as much as possible. In addition, be careful when contacting high-risk patients in the future.