IPN unique identifier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi.
I thought txn_id was the IPN unique identifier, but it might be the transaction unique ID. I discovered that when the buyer purchases a product, then requests a refund through PayPal Resolution Center, and the seller approves the refund. In such case, I receive two different IPNs with same txn_id, one with payment_status = Reversed and other with payment_status = Canceled_Reversal.
I need an unique ID for each unique IPN, so I can avoid to process it more than once in case PayPal sends me twice for any reason. Maybe txn_id + payment_status + reason_code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, I decided to change what I save in database.
Now I am saving each transaction instead of each IPN, so the table's name changed from paypal_ipns to paypal_transactions. Then I am going to have only one row for those two IPNs with the same txn_id, which is going to be inserted in the table when I receive the first IPN (the one with payment_status = Reversed), and it is going to be updated when I receive the second IPN (the one with payment_status = Canceled_Reversal).
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- can we assign a unique detail to every subscription creation? in NVP/SOAP APIs
- Paypal payment error analysis and root cause in NVP/SOAP APIs
- Shopify invoice numbers on Paypal transactions in Sandbox Environment
- Need Help Upgrading to PayPal complete payments in PayPal Upgrade Community
- Subscription Implementation in REST APIs