You can use the "TRADE_SHOW"-Event. The name of the player who is trading with you is UnitName("NPC").
Code:
function WhoIsTrading_OnLoad()
this->RegisterEvent("TRADE_SHOW");
end
function WhoIsTrading_OnEvent()
if(event == "TRADE_SHOW") then
DEFAULT_CHAT_FRAME:AddMessage("Trader: " .. UnitName("NPC"));
end
end