Exemplo n.º 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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 4
0
 public WeQrcodeCreate(string actionName, WeQrcodeInfo card)
 {
     ActionName = actionName;
     Card       = card;
 }
Exemplo n.º 5
0
 public WeQrcodeCreate(string actionName, WeQrcodeInfo card)
 {
     ActionName = actionName;
     Card = card;
 }