I think, if I remember correctly, that you get xp for a trap if you;
1) disable the trap
2) trigger the trap, but survive
3) bypass the trap
Essentially. As long as you are aware of the trap (either pre or post trigger) you'll get xp for it...
Also, I'm pretty sure you use Perception to...