I'm using the django-paypal
library to use PayPal payments on my site.
Following the example, I have set the paypal_dict
and added the form.
paypal_dict = {
"business": settings.PAYPAL_RECEIVER_EMAIL,
"amount": "10000000.00",
"item_name": "name of the item",
"invoice": "unique-invoice-id",
"notify_url": "https://www.example.com" + reverse('paypal-ipn'),
"return_url": "https://www.example.com/your-return-location/",
"cancel_return": "https://www.example.com/your-cancel-location/",
}
However, I am getting the error global name 'reverse' is not defined
I am using Python 2.7.9, what's going on?
reverse
. Did you define one somewhere? Or expect to have imported one? – Preteritivereverse
function, which you get for free if your module is loaded as a Django view, but not if you import or run it in some other way. – Preteritive