我正在使用django-paypal标准IPN为我的网站添加付款功能。 Everythink工作正常,但我有来自paypal的无效回调,但付款成功。
任何人都可以帮助我?
url(r'^payment/$', 'myapp.views.view_that_asks_for_money', name='pay'),
url(r'^payment/callback/', 'paypal.standard.ipn.views.ipn'),
def view_that_asks_for_money(request):
# What you want the button to do.
import uuid
paypal_dict = {
"business": "antonio_mer@gmail.com",
"amount": "1.00",
"item_name": "My Item",
"invoice": uuid.uuid1().hex,
"notify_url": "http://127.0.0.1:8000/payment/callback/",
"return_url": "http://127.0.0.1:8000/payment/callback/",
"cancel_return": "http://127.0.0.1:8000/payment/callback/",
}
# Create the instance.
form = PayPalPaymentsForm(initial=paypal_dict)
context = {"form": form.sandbox }
return render_to_response("myapp/payment.html", context)
在回发中,我只有无效消息