Paypal沙箱付款数据传输

时间:2012-07-23 09:47:37

标签: paypal-sandbox

我在paypal沙盒'付款数据传输'时遇到问题。 在收到tansaction Id后,我将其发送回Paypal并使用Identity tocken获取交易详情。

我已按照此文件'http://media.albendas.com/Web2py_Paypal_Integration.pdf'。

password_mgr= urllib2.HTTPPasswordMgrWithDefaultRealm()
base_url='https://www.sandbox.paypal.com'
header = {'Content-Type ':' application/x-www-form-urlencoded'}
path = '/cgi-bin/webscr'
data = "cmd=_notify-synch&tx="+trans+"&at="+key
password_mgr.add_password(self.realm,base_url,self.username,self.password)
handler = urllib2.HTTPBasicAuthHandler(password_mgr)
opener =urllib2.build_opener(handler)
urllib2.install_opener(opener)
req=urllib2.Request(base_url+path,data,header)
ret = opener.open(req)

通常我应该收到一条消息,要么成功失败。但对我来说总是得到返回页面 我们目前无法完成您的请求。请单击“重试”或稍后重试。我们对不便表示抱歉。 消息3004。

请告知。 另请告诉我,领域参数是什么。 提前谢谢。

0 个答案:

没有答案
相关问题