Author Topic: Issue in creating QR code for transfer  (Read 2835 times)

0 Members and 1 Guest are viewing this topic.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Just added a quick python demo


Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc

Offline abit

  • Committee member
  • Hero Member
  • *
  • Posts: 4667
    • View Profile
    • Abit's Hive Blog
  • BitShares: abit
  • GitHub: abitmore
very cool ..
Didn't even know invoices are already implemented.

Good job!

What's your application going to do?
Yes very impressive. We probably should write some docs for it. Xeroc: is it on your to-do list ? 8)
BitShares committee member: abit
BitShares witness: in.abit

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
very cool ..
Didn't even know invoices are already implemented.

Good job!

What's your application going to do?

Offline madforstrength

I have successfully created the QR code, Actually I was creating qr code of whole URL, instead I had to create QR code for base58BLOB only, the generated qr code is workinf perfectly fine in bitshares android app. :)

Offline madforstrength

I have found the issue,  the JSON itself was the culprit I was missing currency field in json. My Updated json is:
Code: [Select]
{
    "to": "mbilal-knysys",
    "to_label": "mbilal",
    "currency": "BTS",
    "memo": "Invoice #1234",
    "line_items": [
        {"label": "Something to Buy", "quantity": 1, "price": "10.00"},
        {"label": "10 things to Buy", "quantity": 10, "price": "1.00"}
    ],
    "note": "Something the merchant wants to say to the user",
    "callback": "https://merchant.org/complete"
}

Which yields: https://bitshares.openledger.info/#/invoice/k5ZHx7oUHxkaQngisvbCpSt3WiJikU6yvsjeSTD4uREZHyHn1bFon7AurvNFBMf3kS9JChEwKpUm7e1B6qyyWCEtdwBodQVPg7Mo88KQRZYHFnJLk3ctekS2thANt18rrx26dRupNGAsx34b5o4Pt6RS3GyFDesurqYHqMCo1ECondoDhXMAvLQB2LwTYH3okHaVQke6qYAL9z8wjYSTVg9hpEgr5vgpwLFCQ3QdybuUXUryDyVsqn1KtBiKLdzFewofwk1zWz3dnwUWtScSqhoCbCmvVNo8oh4uZCetgVLQwoM


This url is working perfectly fine.

Now when i create its QR code and scan it in bitshares android app found at: https://bitsharestalk.org/index.php/topic,20762.msg268174.html#msg268174

The app is not reading the QR correctly. SO how can i generate a QR code that can be used in bitshares android app?

Offline madforstrength

Hi again Guyz,

I am following this link https://github.com/cryptonomex/graphene/wiki/Wallet%20Merchant%20Protocol to create payment request.

I have created this JSON:
Code: [Select]
{
   "to" : "mbilal-knysys",
   "to_label" : "mbilal",
   "memo" : "Invoice #1234",
   "line_items" : [
        { "label" : "Something to Buy", "quantity": 1, "price" : "10.00 BTS" }
    ],
    "note" : "test payment",
    "callback" : "https://merchant.org/complete"
}

Then used http://nmrugg.github.io/LZMA-JS/demos/advanced_demo.html to compress it to:
Code: [Select]
5d 00 00 00 02 0d 01 00 00 00 00 00 00 00 3d 82
80 18 fb a3 18 e3 e9 d3 0e 4b de 31 cc 45 63 09
5a 31 0f c4 90 89 9d 56 e5 f9 a3 9b ec 81 6c 21
bc 44 ac c6 ba 95 3d 85 65 e0 26 e2 e8 f7 7d 93
af 5b a8 10 b9 1e 24 6c 71 3d 91 ff b1 25 91 1f
a9 ad 85 5e f5 21 c2 84 79 57 e3 ab fa 67 01 56
81 f1 6e 01 3d da 73 c8 ce 1a 3e 22 d7 2c 22 01
3e c4 2e ff b7 8f b9 b4 b5 d8 9f a3 23 c2 9c 8f
2f 08 b6 2d 01 63 88 01 70 f9 fe a8 35 e0 d4 85
7b 74 7b 68 15 cc 75 92 08 86 c4 56 0d 41 af 73
4a 11 fa df ce 14 34 80 81 d8 f7 d0 e8 61 d4 58
72 bc d7 1f 8a 04 0f 83 99 a8 74 13 fb db df 77
63 7b ea ae 64 ab e2 25 c9 d6 16 36 ff 35 ee 40
00

Then used http://lenschulwitz.com/base58 for base58 encoding:
Code: [Select]
32BKKahCswNpnquiVorvDuAz6SWDRUWmGP9SaCX1AwF1mSKM1nebRmkpSjymMgiNCZEbrRgVyFKaZbWLReANgfDn6qw9tcJS53ubkbx4EMPwZCpVMzxRPQu2deGqCdEw77mxhi1BAwigcTp3UbZv8vGMXZFMKmMzSfheQJLyJe36CHPjpJCcbd73kVVwnaxXJb674WdshZvc1MgJsnvinnGtqjx59MVve1Whh2t4mGPQXXjbYea4uSzAVn8Yf1Cy5YQxXKC9AVdRUfEMdjfs13CjfSP9YT

Now when I am visiting https://bitshares.openledger.info/#/invoice/32BKKahCswNpnquiVorvDuAz6SWDRUWmGP9SaCX1AwF1mSKM1nebRmkpSjymMgiNCZEbrRgVyFKaZbWLReANgfDn6qw9tcJS53ubkbx4EMPwZCpVMzxRPQu2deGqCdEw77mxhi1BAwigcTp3UbZv8vGMXZFMKmMzSfheQJLyJe36CHPjpJCcbd73kVVwnaxXJb674WdshZvc1MgJsnvinnGtqjx59MVve1Whh2t4mGPQXXjbYea4uSzAVn8Yf1Cy5YQxXKC9AVdRUfEMdjfs13CjfSP9YT

It is showing
Quote
Asset is not supported by this blockchain.

I have tried many different assets and json but got same result.

I would appreciate if anyone can point me in right direction.

Thanks