Skip to content

Instantly share code, notes, and snippets.

@imryan
Forked from aamnah/google_api_qrcode.php
Last active February 28, 2018 19:11
Show Gist options
  • Save imryan/a1eacf70614144048906bbb3c45d62d2 to your computer and use it in GitHub Desktop.
Save imryan/a1eacf70614144048906bbb3c45d62d2 to your computer and use it in GitHub Desktop.
Generate a QR code using Google Charts API (for Paybear transactions)
// Type
let cht = "qr"
// Size
let chs = "180x180"
// Transaction message
let chl = "ethereum:\(walletAddress)?amount=\(amount)&message=\(message)" // URL-encode
// Final URL
let url = "https://chart.googleapis.com/chart?cht=\(cht)&chs=\(chs)&chl=\(chl)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment