0

If the payment status in "VERIFIED" then I'll just check if the txn_id exists(using sql) if it doesn't exist then I will continue checking the payment BUT if the txn_id exists it won't continue.

Is this checking method correct for the txn_id in order of preventing a fraud?

Thanks in advance,

Josi
  • 71
  • 1
  • 5
  • possible duplicate of [PayPal IPN unique identifier](http://stackoverflow.com/questions/9240235/paypal-ipn-unique-identifier) – T.Todua Apr 08 '14 at 12:58

1 Answers1

1

No, it's to ensure you don't process the same transaction twice. Checking the txn_id by itself isn't sufficient. If it isn't null you have to check the tuple {txn_id, payment_status}, and if it is null you may have to check {parent_txn_id, payment_status}, or else other things like the subscr_id.

user207421
  • 305,947
  • 44
  • 307
  • 483