I have a question, is the paypal IPN txn_id unique for each transaction? What I mean with this is, is it possible to have 2 separate transactions, with the same txn_id? Because I'm using the TXN_ID has my Order ID in my database, and I wanted to know if there is any risk of having duplicated txn id's on 2 different purchases. thanks.
Within each environment -- Sandbox and Live -- transaction IDs are always unique. Occasionally there is some crossover to where the same transaction ID exists on both Sandbox and Live, but they will always represent different transactions. Additionally, in 99.999999% of cases, if you have a Live transaction ID, the corresponding Sandbox transaction ID will belong to someone else (and vice versa).
Ergo, just be careful that you don't store both Live and Sandbox transaction IDs in the same table and you should be fine.