我正在使用硬币支付网关,我想生成带有地址和金额的二维码。 如何通过地址在 google chart api 中传递金额?
这段代码非常适合比特币:
<img width="220" height="220" src="https://blockchain.info/qr?data=ethereum:<?php echo $result['result']['address']; ?>?amount=<?php echo $result['result']['amount']; ?>%26label=example%2520label">
但是这两个都没有得到地址的金额
<center><img width="220" height="220" alt="bitcoin" src="http://chart.apis.google.com/chart?cht=qr&chs=500x500&chl=Ethereum:<?php echo $result['result']['address']; ?>&chld=H|0"></center>
<center><img width="220" height="220" alt="bitcoin" src="https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=ethereum:0x<?php echo $result['result']['address']; ?>&choe=UTF-8"></center>`
最佳答案
我认为这是不可能的,因为即使是像“coinpayments.net”这样的大型硬币接受网站的二维码支付也不包括金额。 (但如果用比特币或其他货币支付,它会。)很抱歉让你失望了,但你能做的最好的就是
src="https://chart.googleapis.com/chart?chs=300&300&chld=L|2&cht=qr&chl=ethereum:<?php echo $result['result']['address']; ?>"
链接看起来像
https://chart.googleapis.com/chart?chs=225x225&chld=L|2&cht=qr&chl=ethereum:0x9610a371F94BE34D4D0CB9c35D621d657133c0e5
似乎没有人包括他们的数量......
关于php - 如何生成带有金额的以太坊二维码地址?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47777969/