Closed carlosmain closed 7 years ago
I edited your comment so I could read the code (see https://guides.github.com/features/mastering-markdown/ )
Is there a reason you are running an old version of django-paypal? I would always start with the newest version.
I normally can't give support help like this on GitHub, or at all. That said, the missing information here:
1) What you did 2) What you expected to happen 3) What actually happened
In other words, how are you attempting to use this code? For a signal to be fired, PayPal has to send a request to your app. Is that request being sent? Is it being received by your app at all? Have you tested this from a development using the sandbox and got it to work? Those are the questions I would ask. I'm not able to provide further assistance I'm afraid. Here's an article about debugging webhooks in general. https://hackernoon.com/handling-webhooks-using-django-and-ngrok-b7ff27a6fd47
BTW - in your code, you need to check the amount and the sender etc. as well. You cannot rely on these matching the invoice - see https://django-paypal.readthedocs.io/en/stable/standard/ipn.html
@spookylukey I think this is a common problem with all general setup/walkthroughs. I have followed various including the documentation. My integration works as I can see the IPN in admin/models. I believe it all falls over in the docs at this point: The standard way to do this is to create an AppConfig class and add a ready() method, in which you can register your signal handlers or import a module that does this - see https://django-paypal.readthedocs.io/en/stable/standard/ipn.html As paypal send the request but it is blank in peoples views as the class is not used when the shopper returns to the site.
this is the best response I have found if anyone else comes here looking: https://stackoverflow.com/questions/42943041/understanding-where-to-put-the-ipn-reciever-function-in-django-paypal
Hi,
Im having trouble with getting the signals of my django app being fired.
I have my settings.py
Application definition
My views.py file
The signals.py file
The apps.py file
And at last but not least, my
__init__.py
fileI'm using IPN, django 1.8.6, and django-paypal 0.2.5. This an example i grabbed from a book to get it running.
I can't figure out what is wrong.