YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Checking txn_id Options
zoobie
#1 Posted : Wednesday, July 16, 2003 5:31:11 AM
Rank: Starting Member

Groups: Registered

Joined: 1/16/2003
Posts: 65
Location: ,
// check that txn_id has not been previously processed What's the code for this? Thanks
Sponsor  
 
paypal_pb
#2 Posted : Wednesday, July 16, 2003 5:51:25 PM
Rank: Starting Member

Groups: Registered

Joined: 9/16/2002
Posts: 2,960
Location: ,
You should store the txn_id for each completed payment and then check against that when processing a new payment.

Patrick Breitenbach
PayPal, Inc.
Dev Net: https://www.paypal.com/pdn
zoobie
#3 Posted : Thursday, July 17, 2003 4:28:37 AM
Rank: Starting Member

Groups: Registered

Joined: 1/16/2003
Posts: 65
Location: ,
Well, I have no db...so I guess there's no need for this. Thanks
paypal_pb
#4 Posted : Thursday, July 17, 2003 3:23:41 PM
Rank: Starting Member

Groups: Registered

Joined: 9/16/2002
Posts: 2,960
Location: ,
It's a pre-cautionay measure to avoid duplicate processing of a single payment. It's not required but if you skip the step, you should occasionally monitor your txn history to make sure your processing correctly. You could save txn_id's to a file as well and check against that.

Patrick Breitenbach
PayPal, Inc.
Dev Net: https://www.paypal.com/pdn
Windwaker
#5 Posted : Friday, July 18, 2003 8:52:14 PM
Rank: Starting Member

Groups: Registered

Joined: 4/14/2003
Posts: 59
Location: ,

Since you're using php you might want to look into dbm.
Lakario
#6 Posted : Wednesday, July 30, 2003 11:39:30 AM
Rank: Starting Member

Groups: Registered

Joined: 6/21/2003
Posts: 7
Location: ,
I'm not sure I completely understand this. Should we store our txn_id in the database and verify it isn't already existant when another transaction takes place? If that is the case, I don't see why we have to worry at all. Isn't txn_id unique everytime? Also, if I am to store it in my db, what's the format for it? Would a VARCHAR 255 be suitable?

Lakario
ModDev.net
Windwaker
#7 Posted : Friday, August 01, 2003 12:45:21 AM
Rank: Starting Member

Groups: Registered

Joined: 4/14/2003
Posts: 59
Location: ,

PayPal sends out various IPNs for various reasons on the same txn_id. You want to make sure you don't double process a transaction.

If you want to do any form of logic on a txn_id you need to store this somewhere. For example, if you want to allow a customer to check their order status, you would need to store the state in some way.

Yes, a varchar 255 should work just fine.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAFVision Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF | YAF © 2003-2009, Yet Another Forum.NET
This page was generated in 0.256 seconds.