Example #1
0
        public string QrcodeCreate(string actionName, WeQrcodeInfo card)
        {
            TkDebug.AssertArgumentNullOrEmpty(actionName, "actionName", null);
            TkDebug.AssertArgumentNull(card, "card", null);

            string         url     = WeUtil.GetUrl(WeCardConst.QRCODE_CREATE);
            WeQrcodeCreate request = new WeQrcodeCreate(actionName, card);
            var            result  = WeUtil.PostToUri(url, request.WriteJson(), new WeQrcodeTicket());

            return(result.Ticket);
        }
Example #2
0
        public string QrcodeCreate(string actionName, string cardId, string code, string openid, int? expireSeconds, bool isUnique, int? balance, int outerId)
        {
            TkDebug.AssertArgumentNullOrEmpty(actionName, "actionName", null);
            TkDebug.AssertArgumentNull(cardId, "cardId", null);

            WeQrcodeInfo info = new WeQrcodeInfo(cardId)
            {
                Code = code,
                OpenId = openid,
                ExpireSeconds = expireSeconds,
                IsUniqueCode = isUnique,
                Balance = balance,
                OuterId = outerId
            };

            string url = WeUtil.GetUrl(WeCardConst.QRCODE_CREATE);
            WeQrcodeCreate request = new WeQrcodeCreate(actionName, info);
            var result = WeUtil.PostToUri(url, request.WriteJson(), new WeQrcodeTicket());
            return result.Ticket;
        }
Example #3
0
        public string QrcodeCreate(string actionName, WeQrcodeInfo card)
        {
            TkDebug.AssertArgumentNullOrEmpty(actionName, "actionName", null);
            TkDebug.AssertArgumentNull(card, "card", null);

            string url = WeUtil.GetUrl(WeCardConst.QRCODE_CREATE);
            WeQrcodeCreate request = new WeQrcodeCreate(actionName, card);
            var result = WeUtil.PostToUri(url, request.WriteJson(), new WeQrcodeTicket());
            return result.Ticket;
        }