Пример #1
0
 public string notifyPay(HttpRequest request, HttpResponse response, Paypayzhu paypayzhu)
 {
     // 保证密钥一致性
     if (PayUtil.checkPayKey(paypayzhu))
     {
         // TODO 做自己想做的
         return("成功了");
     }
     else
     {
         // TODO 该怎么做就怎么做
         return("失败了");
     }
 }
Пример #2
0
        public JObject Pay(Paypayzhu payz)
        {
            Dictionary <string, string> remote = new Dictionary <string, string>();

            remote.Add("api_user", PayUtil.API_USER);
            remote.Add("price", payz.Price);
            remote.Add("type", payz.Type.ToString());
            remote.Add("redirect", payz.Redirect);
            //  remote.Add("order_id", PayUtil.getOrderIdByUUId());
            remote.Add("order_id", payz.Order_id);
            remote.Add("order_info", payz.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);
        }