コード例 #1
0
        /// <summary>
        /// 万通签到
        /// </summary>
        /// <returns></returns>
        public static Boolean WantongSign()
        {
            try
            {
                //签到
                SignParam      param                   = WantongBLL.sign();
                PayAccess      access                  = new PayAccess();
                SignResultInfo signResultInfo          = access.SignAcc(param);
                Dictionary <string, string> signResult = signResultInfo.data;
                if (signResult == null)
                {
                    return(false);
                }
                log.Write("万通签到返回码:" + signResult["39"]);
                SysStateParam.wtSignInfo = "返回码:" + signResult["39"];
                //键盘安装工作秘钥
                string _62 = signResult["62"];


                if (signResult["39"].Trim().Equals("00"))
                {
                    //获取44域中的密文密钥
                    string mackeyExpress = _62.Substring(_62.Length - 40, 40);

                    string pinKeyExpress = _62.Substring(0, 40);

                    bool ret = Sign(1, mackeyExpress, pinKeyExpress);
                    return(ret);
                }
                return(false);
            }
            catch { return(false); }
        }
コード例 #2
0
 public static Boolean LakalaSign()
 {
     try
     {
         SignParam      param                   = LKLProcedure.sign();
         PayAccess      access                  = new PayAccess();
         SignResultInfo signResultInfo          = access.SignAcc(param);
         Dictionary <string, string> signResult = signResultInfo.data;
         if (signResult == null)
         {
             return(false);
         }
         log.Write("拉卡拉签到返回码:" + signResult["39"]);
         SysStateParam.lklSignInfo = "返回码:" + signResult["39"];
         if (signResult["39"].Trim().Equals("00"))
         {
             string _44 = signResult["44"];
             //获取44域中的密文密钥
             string mackeyExpress = _44.Substring(_44.Length - 16, 16);
             string pinKeyExpress = _44.Substring(0, 32);
             LKLProcedure.RebuildBatchNo();//批次号+1
             bool ret = Sign(0, mackeyExpress, pinKeyExpress);
             if (ret)
             {
                 return(true);
             }
             else
             {
                 return(false);
             }
         }
         else
         {
             log.Write("拉卡拉签到失败!");
         }
         return(false);
     }
     catch { return(false); }
 }