如何允许django-商人接收Paypal IPN构象? [英] How do I allow django-merchant to receive paypal IPN conformations?

查看:94
本文介绍了如何允许django-商人接收Paypal IPN构象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了许多类似的问题,但看来我仍然无法进行设置:(

I have found many similar questions, but it seems I still cannot make my set-up to work :(

我正在尝试使用django-merchant在我的网站上接受简单的IPN贝宝付款;如果我理解正确,则设置正确后: -django-merchant应该为PayPal提供视图,以便在类似于 myURL:myPORT/.../paypal-ipn-handler 的地址处进行调用; -上面提到的视图是在paypal/standard/ipn/views.py中找到的视图,其中paypal是django-merchant包装的django-paypal应用程序的根目录

I am trying to use django-merchant to accept simple IPN paypal payments in my website; if I understand it right, once the set-up is correct: - django-merchant should serve a view for PayPal to call at an address that looks like myURL:myPORT/.../paypal-ipn-handler; - the view mentioned above is the one found in paypal/standard/ipn/views.py, where paypal is the root directory of the django-paypal app, that django-merchant wraps

目前,我正在使用Paypal的调试版本,并且: -我可以成功进行(假)付款,并让PayPal调用"return-url"以显示成功消息; -我的设置运行在具有静态ip-address的服务器上,并且我尝试完全禁用防火墙,因此不应是可达性"问题; -如果删除django-paypal IPN视图上的@require_POST装饰器并手动打开 myURL:myPORT/.../paypal-ipn-handler 浏览器页面,它将成功"创建失败的交易在数据库上的条目

At the moment I am using the debug version of paypal, and: - I can successfully make (fake) payments and have PayPal call the "return-url" to display the success message; - my set-up is running on a server with static ip-address, and I tried disabling the firewall altogether, so should not be a "reach-ability" problem; - if I remove the @require_POST decorator on the django-paypal IPN view and manually open the myURL:myPORT/.../paypal-ipn-handler browser page, it "successfully" creates a failed transaction entry on the db

但是:我只是永远无法让PayPal成功致电我的 myURL:myPORT/.../paypal-ipn-handler (不要进行虚假购买,不使用PayPal开发人员中的模拟器"工具).

BUT: I Just cannot ever have PayPal successfully call my myURL:myPORT/.../paypal-ipn-handler (not making fake purchases, not using the "simulator" in the PayPal's developer tools).

我已经看到信号可能有问题,但是我所有的测试都表明我的问题早于此,并且PayPay购买确认从未到达指定的paypal-ipn-handler(我按照django-merchant文档中所述完全进行了设置) ).

I have seen may had problems with signals, but all my tests suggest that my problem comes before that, and PayPay purchase confirmation never reach the designated paypal-ipn-handler (which I set up exactly as mentioned on django-merchant documentation).

很抱歉,很长的帖子,非常感谢:)

Sorry for the long post, any is greatly appreciated :)

推荐答案

已解决!

以防万一有人遇到相同的问题:

Just in case someone runs in the same problem:

没有太多文献记载,但是似乎在测试"模式下,只有在标准"端口(例如:80)上时,贝宝IPN notify_url才有效.

It is not much documented, but it seems that when in TEST-mode, PayPal IPN notify_url only works if this is on a "standard" port, like :80.

本文有助于(特别是Matthew Fox的评论):
http://www.arronwoods. com/blog/2008/09/paypal-ipn-from-the-sandbox-not-working/

This article helps (in particular Matthew Fox's comment):
http://www.arronwoods.com/blog/2008/09/paypal-ipn-from-the-sandbox-not-working/

作为参考,如果在Windows下工作,则这是端口转发的快捷方式",如果您尚未为项目使用默认端口(请替换端口号和例子中的IP地址,当然是您的!):
https://social.technet.microsoft.com/Forums/windowsserver/zh-CN/417fcbcd-169d-4f7a-8f3a-7a00a91bad66/windows-2012-firewall-port-forwarding?forum=winservercore

For reference, if working under Windows, here is a "quick-and-dirty" way for port forwarding do avoid having to change any setting if you're not already using a default port for your project (substitute port numbers and ip address from the example with yours, of course!):
https://social.technet.microsoft.com/Forums/windowsserver/en-US/417fcbcd-169d-4f7a-8f3a-7a00a91bad66/windows-2012-firewall-port-forwarding?forum=winservercore

这篇关于如何允许django-商人接收Paypal IPN构象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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