示例#1
0
        public JObject order(string order_id)
        {
            Dictionary <string, string> paramMap = new Dictionary <string, string>();

            paramMap.Add("api_user", PayUtil.API_USER);
            paramMap.Add("order_id", order_id);
            string signature = PayUtil.getSignature(PayUtil.API_USER, paramMap);

            // System.out.println(signature);
            paramMap.Add("signature", signature);
            string  idd = PayUtil.GetResponseString(PayUtil.CreatePostHttpResponse("https://www.paypayzhu.com/api/order_query", paramMap));
            JObject jo  = (JObject)JsonConvert.DeserializeObject(PayUtil.GetResponseString(PayUtil.CreatePostHttpResponse("https://www.paypayzhu.com/api/order_query", paramMap)));

            //JSONObject result = PayUtil.post(API_URL + "order_query", paramMap);
            return(jo);
        }
示例#2
0
        public JObject Pay(string type, string price, string redirect, string order_id, string order_info)
        {
            Dictionary <string, string> remote = new Dictionary <string, string>();

            remote.Add("api_user", PayUtil.API_USER);
            remote.Add("price", price);
            remote.Add("type", type);
            remote.Add("redirect", redirect);
            //  remote.Add("order_id", PayUtil.getOrderIdByUUId());
            remote.Add("order_id", order_id);
            remote.Add("order_info", order_info);
            remote.Add("signature", PayUtil.getSignature(PayUtil.API_USER, remote));
            JObject jo = (JObject)JsonConvert.DeserializeObject(PayUtil.GetResponseString(PayUtil.CreatePostHttpResponse("https://www.paypayzhu.com/api/pay_json", remote)));

            return(jo);
        }