我有必要的身份验证详细信息,我正在尝试进行事务搜索。我一直收到一个错误: ACK=Failure&L\u ERRORCODE0=81002&L\u SHORTMESSAGE0=未指定的%20方法&L\u LONGMESSAGE0=方法%20指定的%20is%20not%20Supported&L\u SEVERITYCODE0=错误
这是我的代码:
(timestamp, signature) = signaturegen.getAuthHeader(apiUser=settings.USERNAME, apiPass=settings.PASSWORD, accessTok=res2["token"], secTok=res2["tokenSecret"], httpMethod="POST", scriptURI="https://api-3t.sandbox.paypal.com/nvp")
#the above operation is used to generate the timestamp and signature
headers = {"X-PAYPAL-AUTHORIZATION": "timestamp="+<timestamp>+",token="+<token>+",signature="+<signature>, "SUBJECT": settings.<API_USERNAME>}
data = {
"METHOD": "TransactionSearch",
"STARTDATE": "2012-01-01T05:38:48Z",
}
req= urllib2.Request("https://api-3t.sandbox.paypal.com/nvp", simplejson.dumps(data), headers)
res = urllib2.urlopen(req).read()
我做错了什么。在
将}用于商家nvp API。在
urllib.urlencode
而不是{相关问题 更多 >
编程相关推荐