I am using django-paypal to receive payment. I am currently paying as well as receiving payment using sandbox accounts. The payment procedure seems to be working fine.
My problem is once I get back the signal valid_ipn_received, I am trying to get the amount of money from the transaction.
I went through <a href="https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNandPDTVariables/#id08CTB0S055Z" rel="nofollow">this list</a> of variables returned by Paypal. I also went through <a href="https://github.com/spookylukey/django-paypal/blob/master/paypal/standard/models.py" rel="nofollow">this model</a> to see where it is stored. It seems the amount is stored in auth_amount? However I'm getting a 'None' from that variable. Is this because I'm using a sandbox account? How do I get the amount of transaction?Answer1:
Figured this out a while ago by reading the docs. Posting the answer here.
Apparently, this is how you do it:
amount = ipn_obj.mc_gross