我正在尝试使用django-paypal (也许有一个更好的库?)我从这里学到了:https://django-paypal.readthedocs.org/en/stable/standard/ipn.html
在这个块中使用reverse,但是它在项目中使用时会抛出一个错误(即使您导入它)。
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/",
}我是这样进口的:
from django.core.urlresolvers import reverse我得到了一个错误:
NoReverseMatch at /pay/
Reverse for 'paypal-ipn' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []要么我漏掉了什么东西,要么教程不完整(或者错了?);我只需要在这里做一些修正。
发布于 2015-06-23 22:04:07
问题是我没有在我的urls中添加这个:
url(r'^something/paypal/', include('paypal.standard.ipn.urls')),https://stackoverflow.com/questions/31014073
复制相似问题