I wish we had more information. Of course it could be a sting, but it could also be a safety thing. Maybe there's a history of johns refusing to pay after services are rendered. Maybe there's a history of violence against prostitutes in that region, and this is the hotel's way of saying "If you try anything, we'll know it was you."
But we don't even know how anon hired the prostitute, let alone where he is and what the local laws and attitudes are toward sex work. It's possible he solicited an undercover cop and this was all a set up. It's also possible the hotel knows prostitution happens within its walls and they'll permit it, but they've seen things go south before and this is their strategy to avoid that trouble.
I don't know, but it's probably good that anon didn't go through with the transaction. To me the sketchiest part isn't any specific thing that happened, but the fact that anon wasn't informed about what to expect. Which makes me think these are barriers the hotel put in place and acted on when they recognized a sex worker, not something the sex worker planned to deal with. But again, we just don't have enough information.