我正在我的网站中集成paypal,所以我可以使用WPP,需要在django设置中完成设置,所以我喜欢他们在本教程中说django-paypal 我在测试付款表单时仍然没有收到回复
PayPal Response:
{'ack': 'Failure',
'build': '5715372',
'correlationid': '248fc1aeef2d7',
'l_errorcode0': '10002',
'l_longmessage0': 'Security header is not valid',
'l_severitycode0': 'Error',
'l_shortmessage0': 'Security error',
'timestamp': '2013-05-07T10:15:10Z',
'version': '54.0'}
我使用此代码在我的网站中使用WPP
from paypal.pro.views import PayPalPro
def buy_it_now(request):
item = {
"business": "imoum0007@gmail.com",
"amt": "10.00",
"inv": "inventory",
"custom": "tracking",
"notify_url": "/some/obscure/name/",
"cancelurl": "/account/",
"returnurl": "/account/"}
kw = {"item": item,
"payment_template": "payment.html",
"confirm_template": "confirmation.html",
"success_url": "/success/"}
ppp = PayPalPro(**kw)
return ppp(request)