我正在尝试创建付款账单并通过电报发送给我的客户: 我正在使用区块链API V2-https://blockchain.info/api/api接收。我的代码是:
xpub='***'
keyk='02e57f1***'
url='https://api.blockchain.info/v2/receive?xpub='+str(xpub)+'&callback=https%3A%2F%2Fdoors03.ru&key='+keyk
x=requests.get(url)
r=x.json()
r=r['address']
是一个地址。 我要把它寄给我的客户(顺便问一下,有没有什么方法可以寄到确切的付款金额的地址)。我想查一下是否收到付款:
^{pr2}$这是响应-u'{\n“message”:“内部处理程序错误”\n}' 我做错什么了?如何检查付款?如何发送地址和确切的btc或以太坊总和?在
更新:最后,我找到了解决方案。在
在我的例子中,“Internal handlers error”消息的原因是对其API的错误解释。在
由于他们没有在他们的javaapi中实现balanceupdate请求,所以我是自己做的,而且我做得不对。在
我把这些参数:
作为post参数,就像在api中提供的其他方法一样。在这些方法中,参数是URLEncoded的,就像处理回调链接一样。但是。。。在
在这个HTML请求中,它们必须以json格式的纯文本形式发送,而不需要任何特殊编码,例如:
错误的主要原因可能是您将“Content-Type”:“text/plain”放在data object(,可能还有编码的回调url)中。在
相关问题 更多 >
编程相关推荐