I have a villager farm that i specifically made it to sell enchantments to weapons. I posted you need to bring emeralds and also pay me 200r for each weapon/tool bought. someone (i will not say who) came to my res, bought an item and just left without paying me. i was trying to get my money and then the person just disconnected. how do i get the money i rightfully deserve? i have now made it so i am the only one who can get to the villagers.
As the villagers aren't protected on residences, charging per trade won't work and this will happen almost always with no punishments handed out because they're not protected. Instead, consider make them purchase ACCESS to the room with the villagers and nothing else.
you can set up a redstone device where you set up a shop and when they buy from the shop, it opens a door