|
|
|
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
|
|
|
|
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
Rank: Starting Member
Groups: Registered
Joined: 4/14/2003 Posts: 59 Location: ,
|
Since you're using php you might want to look into dbm.
|
|
|
|
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
|
|
|
|
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.
|
|
|
|
Guest
|
YAFVision Theme by Jaben Cargman (Tiny Gecko)Powered by YAF |
YAF © 2003-2009, Yet Another Forum.NETThis page was generated in 0.256 seconds.