Beispiel #1
0
        /// <summary>
        /// 投标通知
        /// </summary>
        /// <param name="context"></param>
        /// <param name="error"></param>
        /// <returns></returns>
        public Tender.Response TenderNotify(System.Web.HttpContext context, out string error)
        {
            error = "";
            var result = ChinaPayUtil.Deserialize <Tender.Response>(context, out error);

            return(result);
        }
Beispiel #2
0
        /// <summary>
        /// 公司创建账号通知
        /// </summary>
        /// <param name="context"></param>
        /// <param name="error"></param>
        /// <returns></returns>
        public CreateCompanyAccount.Response CreateCompanyAccountNotify(System.Web.HttpContext context, out string error)
        {
            error = "";
            var result = ChinaPayUtil.Deserialize <CreateCompanyAccount.Response>(context, out error);

            return(result);
        }
Beispiel #3
0
        /// <summary>
        /// 跳转提交
        /// </summary>
        /// <param name="send"></param>
        public static void Submit(RequestBase send)
        {
            var html = ChinaPayUtil.GetSubmit(send);

            CoreHelper.EventLog.Log(html, "ChinaPaySubmit", false);
            System.Web.HttpContext.Current.Response.Write(html);
            System.Web.HttpContext.Current.Response.End();
        }
Beispiel #4
0
        /// <summary>
        /// 后台请求
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="send"></param>
        /// <param name="error"></param>
        /// <returns></returns>
        public static T Request <T>(RequestBase send, out string error) where T : ResponseBase, new()
        {
            var xml      = ChinaPayUtil.GetRequest(send);
            var response = CoreHelper.HttpRequest.HttpPost(send.InterFaceUrl, xml, Encoding.UTF8, "application/xml");
            var obj      = ChinaPayUtil.Deserialize <T>(response, out error);

            if (obj == null)
            {
                CoreHelper.EventLog.Log("Request:" + xml, "ChinaPay");
            }
            return(obj);
        }