从django-paypal获取金额 [英] Get amount from django-paypal
问题描述
我的问题是一旦我收到信号valid_ipn_received,我试图从交易中获取金额。
我经历了。我还经历了此模型,以查看位置它被存储。看来数量存储在auth_amount中?但是,我从该变量获得无。这是因为我正在使用沙盒帐号吗?如何获得交易金额?
通过阅读文档,了解了这一点。
显然,这是你如何做的:
amount = ipn_obj.mc_gross
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?
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
这篇关于从django-paypal获取金额的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!