goh
goh

Reputation: 29511

django/commerce/paypal: keeping track of user transactions

currently I wish to integrate paypal payment into my application, so I downloaded django-paypal (dcramer) to test it out with the paypal sandbox. I tried the WPP express checkout payment as my primary payment flow, and have no problems with payment process, worked smoothly.

However like all e-commerce, I am aware that I should keep track of user transactions/payments in my application. This is where I am lost. I've checked the model table paypal_nvp in django-paypal, and there's no field that resembles a transaction-id with Paypal.

If so, how should I keep track of users' payments? Can I use the datetime + user as hash for my transaction id? How can I reference a particular transaction to a paypal transaction?

Anyone who used django-paypal or have experience with e-commerce in django please feel free to offer valuable suggestions.

Upvotes: 0

Views: 378

Answers (1)

Bastian
Bastian

Reputation: 5855

In your database you should have a "paypal_ipn" table with the detailed transactions. You can use that table or you can create your own model for your transactions and link them together. There you will find the transaction-id under the name "txn_id". If you want to fire up a script when a transaction occurs you can use the @receiver(payment_was_successful) signal from djano-paypal. Hope this helps.

Upvotes: 1

Related Questions