Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            OrderQueryModel = new TransQueryModel();

            var accountType = Request.Form["accountType"];

            switch (accountType)
            {
            case "D0":
                PayConfig.paymentType = "2007";
                break;

            case "T1":
                PayConfig.paymentType = "2023";
                break;

            case "DT":
                PayConfig.paymentType = "2007";
                break;

            case "DF":
                PayConfig.paymentType = "2012";
                break;
            }

            PayConfig.productType = "100002";

            OrderQueryModel.orderNo         = Request.Form["orderNo"];
            OrderQueryModel.insCode         = PayConfig.insCode;
            OrderQueryModel.insMerchantCode = PayConfig.insMerchantCode;
            OrderQueryModel.hpMerCode       = PayConfig.hpMerCode;
            OrderQueryModel.transDate       = Request.Form["transDate"];
            OrderQueryModel.transSeq        = Request.Form["transSeq"];
            OrderQueryModel.productType     = PayConfig.productType;
            OrderQueryModel.paymentType     = PayConfig.paymentType;
            OrderQueryModel.nonceStr        = new Random().Next(1, 12).ToString();

            var signString = $"{OrderQueryModel.insCode}|{OrderQueryModel.insMerchantCode}|{OrderQueryModel.hpMerCode}|" +
                             $"{OrderQueryModel.orderNo}|{OrderQueryModel.transDate}|" +
                             $"{OrderQueryModel.transSeq}|{OrderQueryModel.productType}|" +
                             $"{OrderQueryModel.paymentType}|{OrderQueryModel.nonceStr}|{PayConfig.signKey}";

            OrderQueryModel.signature = Helper.GetMD5(signString);

            var postData =
                $"orderNo={OrderQueryModel.orderNo}&" +
                $"insCode={OrderQueryModel.insCode}&" +
                $"insMerchantCode={OrderQueryModel.insMerchantCode}&" +
                $"hpMerCode={OrderQueryModel.hpMerCode}&" +
                $"transDate={OrderQueryModel.transDate}&" +
                $"transSeq={OrderQueryModel.transSeq}&" +
                $"productType={OrderQueryModel.productType}&" +
                $"paymentType={OrderQueryModel.paymentType}&" +
                $"nonceStr={OrderQueryModel.nonceStr}&" +
                $"signature={OrderQueryModel.signature}" +
                $"";

            Log.Logger.Info("代付订单查询", OrderQueryModel);
            Log.Logger.Info("代付订单查询报文", postData);
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            TransQueryModel = new TransQueryModel();

            TransQueryModel.orderNo         = Request.Form["orderNo"];
            TransQueryModel.insCode         = PayConfig.insCode;
            TransQueryModel.insMerchantCode = PayConfig.insMerchantCode;
            TransQueryModel.hpMerCode       = PayConfig.hpMerCode;
            TransQueryModel.transDate       = Request.Form["transDate"];
            TransQueryModel.transSeq        = "";
            TransQueryModel.productType     = PayConfig.productType;
            TransQueryModel.paymentType     = PayConfig.paymentType;
            TransQueryModel.nonceStr        = new Random().Next(1, 12).ToString();

            var signString = $"{TransQueryModel.insCode}|{TransQueryModel.insMerchantCode}|{TransQueryModel.hpMerCode}|" +
                             $"{TransQueryModel.orderNo}|{TransQueryModel.transDate}|" +
                             $"{TransQueryModel.transSeq}|{TransQueryModel.productType}|" +
                             $"{TransQueryModel.paymentType}|{TransQueryModel.nonceStr}|{PayConfig.signKey}";

            TransQueryModel.signature = Helper.GetMD5(signString);

            var postData =
                $"orderNo={TransQueryModel.orderNo}&" +
                $"insCode={TransQueryModel.insCode}&" +
                $"insMerchantCode={TransQueryModel.insMerchantCode}&" +
                $"hpMerCode={TransQueryModel.hpMerCode}&" +
                $"transDate={TransQueryModel.transDate}&" +
                $"transSeq={TransQueryModel.transSeq}&" +
                $"productType={TransQueryModel.productType}&" +
                $"paymentType={TransQueryModel.paymentType}&" +
                $"nonceStr={TransQueryModel.nonceStr}&" +
                $"signature={TransQueryModel.signature}" +
                $"";

            Log.Logger.Info("商户付款订单结果查询", TransQueryModel);
            Log.Logger.Info("商户付款订单结果查询报文", postData);
        }