github地址:EMVCo-SGQR-encode-decode-crc
里面包含解析样例,相关文档,一张聚合支付二维码。
曾经调研过新加坡二维码支付相关技术,整理成一个Demo,希望你能帮助到大家
当时记得有一个二维码样例,拿支付宝可以扫出字符串,微信不行。
字符串使用的是TLV数据结构,解析结果如下:
emvcoStr: 00020101021128650017COM.QQ.WEIXIN.PAY0110100000033702040000030400010404000099020129660018COM.ALIPAY.OPENAPI0110100000033702040000030400010404000099020151800007SG.SGQR01121809072DDA29020701.00010306058602040200050200060400000708201809155204000053037025802SG5901h6009Singapore6304D189
Print Tag
Tag:00 Length:2 Value:01
Tag:01 Length:2 Value:11
Tag:51 Length:80 Value:0007SG.SGQR01121809072DDA29020701.0001030605860204020005020006040000070820180915
Tag:52 Length:4 Value:0000
Tag:53 Length:3 Value:702
Tag:58 Length:2 Value:SG
Tag:59 Length:1 Value:h
Tag:28 Length:65 Value:0017COM.QQ.WEIXIN.PAY01101000000337020400000304000104040000990201
Tag:60 Length:9 Value:Singapore
Tag:29 Length:66 Value:0018COM.ALIPAY.OPENAPI01101000000337020400000304000104040000990201
Tag:63 Length:4 Value:D189
Tag:51 Length:80 Value:0007SG.SGQR01121809072DDA29020701.0001030605860204020005020006040000070820180915
Print SubTag
Tag:00 Length:7 Value:SG.SGQR
Tag:01 Length:12 Value:1809072DDA29
Tag:02 Length:7 Value:01.0001
Tag:03 Length:6 Value:058602
Tag:04 Length:2 Value:00
Tag:05 Length:2 Value:00
Tag:06 Length:4 Value:0000
Tag:07 Length:8 Value:20180915
Tag:28 Length:65 Value:0017COM.QQ.WEIXIN.PAY01101000000337020400000304000104040000990201
Print SubTag
Tag:00 Length:17 Value:COM.QQ.WEIXIN.PAY
Tag:01 Length:10 Value:1000000337
Tag:02 Length:4 Value:0000
Tag:03 Length:4 Value:0001
Tag:99 Length:2 Value:01
Tag:04 Length:4 Value:0000
Tag:29 Length:66 Value:0018COM.ALIPAY.OPENAPI01101000000337020400000304000104040000990201
Print SubTag
Tag:00 Length:18 Value:COM.ALIPAY.OPENAPI
Tag:01 Length:10 Value:1000000337
Tag:02 Length:4 Value:0000
Tag:03 Length:4 Value:0001
Tag:99 Length:2 Value:01
Tag:04 Length:4 Value:0000
网友评论