In Salem there is no integrated transaction system for goods exchange between players.
The usual method for trading is to put your goods in the barrels in Boston or other containers.
This method is not safe and it isn't supposed to be safe.
So the only safe way not to get scammed is to trade with trustworthy people or in small amounts.
The other danger comes from the possibility, that a third party runs to the barrel while in transaction and takes the goods from it.
To remove this possibility the two traders can position themselves in the way described in the picture below.