How to generate ethereum qr code address with amount

0 votes

I working on coinpayment gateway I want to generate qr code with address and amount. How to pass amount in google chart api with address?

This code is perfect working for bitcoin:

<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">

But these both are not getting amount with address

<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>`

Sep 6, 2018 in Blockchain by digger
• 26,740 points
5,087 views

2 answers to this question.

0 votes

I think it's impossible, because even big coin accepting sites like "coinpayments.net" 's qr payment code doesn't include the amount. (But if paid with bitcoin or other currency it does.) Sorry to let you down but the best you could do is

src="https://chart.googleapis.com/chart?chs=300&300&chld=L|2&cht=qr&chl=ethereum:<?php echo $result['result']['address']; ?>"

the link will look somthing like

https://chart.googleapis.com/chart?chs=225x225&chld=L|2&cht=qr&chl=ethereum:0x9610a371F94BE34D4D0CB9c35D621d657133c0e5

no one seems to include their amount...

answered Sep 6, 2018 by slayer
• 29,370 points
0 votes

You implement this package: ethereum-qr-code.

It implements the EIP67 standard which uses a value field for the amount-to-pay and an ethereumfield for the ETH address.

However, actual usage of the QR protocol is currently very fractured and gives different and unexpected results based on which wallet the user uses.

Some problems found with some Ethereum wallets:

  • imTokenBRD walletLykke require a QR field: amount to be ETH

  • Trust wallet requires a QR field: amount to be wei instead of ETH!

  • Toshi wallet crashes on QR code scan (at time of writing 2018-07-24)

  • None of the wallets we tried use the value field.

answered Sep 6, 2018 by Omkar
• 69,220 points

Related Questions In Blockchain

0 votes
1 answer

How to generate new address for blockchain wallet?

You can use the following to generate ...READ MORE

answered Jul 16, 2018 in Blockchain by digger
• 26,740 points
3,279 views
0 votes
1 answer

How do I get the total amount sent to an address?

If you are using web3JS you can ...READ MORE

answered Jul 19, 2018 in Blockchain by Johnathon
• 9,090 points
903 views
0 votes
1 answer

How to generate Bitcoin address in Ruby?

In your generate_address_from_public_key_hash method, the checksum should be over ...READ MORE

answered Aug 22, 2018 in Blockchain by slayer
• 29,370 points
2,684 views
0 votes
1 answer

How to generate pem with openssl?

Here’s the working code: int generatePem(char **pem) { ...READ MORE

answered Aug 23, 2018 in Blockchain by digger
• 26,740 points
1,139 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,460 points
1,428 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,923 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,451 views
0 votes
1 answer

Php code to generate Ethereum wallets.

You can use web3.eth.accounts in web3js web3.eth.accounts.create(); With Php, ...READ MORE

answered Jul 27, 2018 in Blockchain by slayer
• 29,370 points
3,369 views
+1 vote
1 answer

How to generate Bitcoin address?

Convert the hex string back to bytes ...READ MORE

answered Aug 20, 2018 in Blockchain by slayer
• 29,370 points
1,151 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP