How do I allow django-merchant to receive paypal IPN conformations?

不想你离开。 提交于 2019-12-08 03:56:37

问题


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

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

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

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).

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 :)


回答1:


SOLVED!!

Just in case someone runs in the same problem:

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.

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

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



来源:https://stackoverflow.com/questions/27392384/how-do-i-allow-django-merchant-to-receive-paypal-ipn-conformations

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