public HttpResponseMessage X_ScanCode(payparameter payparameter)
        {
            string result = string.Empty;

            try
            {
                RulePayMethod rulePay    = new RulePayMethod();
                rerurnpram    rerurnpram = rulePay.Islegitimate(payparameter);

                if (payparameter.PayType == "119" && payparameter.PayType == "104")
                {
                    result = rule.JsonStrCode(rerurnpram.statecode, rerurnpram.message, rerurnpram.data, rerurnpram.urlcode);
                }
                else
                {
                    result = rule.JsonStr(rerurnpram.statecode, rerurnpram.message, rerurnpram.data);
                }

                return(new HttpResponseMessage {
                    Content = new StringContent(result, System.Text.Encoding.UTF8, "application/json")
                });
            }

            catch (Exception e)
            {
                //错误保存日志
                throw new InsertException(e.Message, "Transaction", "LB_ScanCode", payparameter.ToString());
            }
        }
        /// <summary>
        ///  功能描述:H5支付
        ///  创建  人:周文卿
        ///  创建时间:2018-11-20
        /// </summary>
        /// <param name="payparameter">参数</param>
        /// <returns></returns>

        public HttpResponseMessage X_PayH5(payparameter payparameter)
        {
            string result = string.Empty;

            try
            {
                //首先判断商户号是否存在
                RulePayMethod rulePay    = new RulePayMethod();
                rerurnpram    rerurnpram = rulePay.Islegitimate(payparameter);

                result = rule.JsonStr(rerurnpram.statecode, rerurnpram.message, rerurnpram.data);
                return(new HttpResponseMessage {
                    Content = new StringContent(result, System.Text.Encoding.UTF8, "application/json")
                });
            }
            catch (Exception e)
            {
                //错误保存日志
                throw new InsertException(e.Message, "Transaction", "LB_PayH5", payparameter.ToString());
            }
        }