Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 3
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);
        }