Get amount from django-paypal

只谈情不闲聊 提交于 2019-12-12 03:34:56

问题


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 this list of variables returned by Paypal. I also went through this model 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?


回答1:


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


来源:https://stackoverflow.com/questions/34379905/get-amount-from-django-paypal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!