从django-paypal获取金额 [英] Get amount from django-paypal

查看:160
本文介绍了从django-paypal获取金额的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆