Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何修复django中的paypal设置_Django_Paypal - Fatal编程技术网

如何修复django中的paypal设置

如何修复django中的paypal设置,django,paypal,Django,Paypal,我在我的网站上集成了paypal,所以我可以使用WPP。有一个设置需要在django设置中完成,所以我像他们在本教程中说的那样做了 在测试支付表单时,我仍然无法响应 PayPal Response: {'ack': 'Failure', 'build': '5715372', 'correlationid': '248fc1aeef2d7', 'l_errorcode0': '10002', 'l_longmessage0': 'Security header is not valid'

我在我的网站上集成了paypal,所以我可以使用WPP。有一个设置需要在django设置中完成,所以我像他们在本教程中说的那样做了 在测试支付表单时,我仍然无法响应

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)