Inheritance: MessageBase
Exemple #1
0
        public override void Submit(IPayHistory order)
        {
            base.BaseSubmit(order);
            var request = new Message.Web.PayRequest();

            request.version      = PartnerConfig.VERSION;
            request.oid_partner  = PartnerConfig.OID_PARTNER;
            request.user_id      = order.UserId;
            request.timestamp    = YinTongUtil.getCurrentDateTimeStr();
            request.sign_type    = PartnerConfig.SIGN_TYPE;
            request.busi_partner = PartnerConfig.BUSI_PARTNER;
            request.no_order     = order.OrderId;
            request.dt_order     = YinTongUtil.getCurrentDateTimeStr();
            request.name_goods   = "在线充值";
            request.money_order  = order.Amount.ToString();
            request.notify_url   = notify_url;
            request.url_return   = return_url;
            request.SetSign();
            var           fields = request.GetType().GetFields();
            StringBuilder sbHtml = new StringBuilder();

            sbHtml.Append("<form id='payBillForm' action='" + request.InterFaceUrl + "' method='post'>");

            foreach (var temp in fields)
            {
                sbHtml.Append("<input type='hidden' name='" + temp.Name + "' value='" + temp.GetValue(request) + "'/>");
            }
            //submit按钮控件请不要含有name属性
            sbHtml.Append("<input type='submit' value='tijiao' style='display:none;'></form>");
            sbHtml.Append("<script>document.forms['payBillForm'].submit();</script>");
            HttpContext.Current.Response.Write(sbHtml.ToString());
        }
Exemple #2
0
        public override void Submit(IPayHistory order)
        {
            base.BaseSubmit(order);
            var request = new Message.Web.PayRequest();
            request.version = PartnerConfig.VERSION;
            request.oid_partner = PartnerConfig.OID_PARTNER;
            request.user_id = order.UserId;
            request.timestamp = YinTongUtil.getCurrentDateTimeStr();
            request.sign_type = PartnerConfig.SIGN_TYPE;
            request.busi_partner = PartnerConfig.BUSI_PARTNER;
            request.no_order = order.OrderId;
            request.dt_order = YinTongUtil.getCurrentDateTimeStr();
            request.name_goods = "在线充值";
            request.money_order = order.Amount.ToString();
            request.notify_url = notify_url;
            request.url_return = return_url;
            request.SetSign();
            var fields = request.GetType().GetFields();
            StringBuilder sbHtml = new StringBuilder();
            sbHtml.Append("<form id='payBillForm' action='" + request.InterFaceUrl + "' method='post'>");

            foreach (var temp in fields)
            {
                sbHtml.Append("<input type='hidden' name='" + temp.Name + "' value='" + temp.GetValue(request) + "'/>");
            }
            //submit按钮控件请不要含有name属性
            sbHtml.Append("<input type='submit' value='tijiao' style='display:none;'></form>");
            sbHtml.Append("<script>document.forms['payBillForm'].submit();</script>");
            HttpContext.Current.Response.Write(sbHtml.ToString());
        }