sign = HttpUtility.UrlEncode(sign, Encoding.UTF8);
string payInfo = GetOrderInfoWithEncode() + "&sign=" + sign;
strJson = payInfo.Replace("+", "%20");//ÈÕÆÚÄÇÀï»áÓÐÒ»¸ö¿Õ¸ñ(2017-01-05 11:11:11)ת»¯Îª+,ËùÒÔÕâÀïÒªÌæ»»Ò»ÏÂ
FileLog.WriteLog("Ö§¸¶±¦´®:" + strJson);
}
catch (Exception ex)
{
FileLog.WriteLog(ex.ToString());
}
return strJson;
}
/// <summary>
/// ²»°üº¬EncodeµÄ×Ö·û´®Æ´½Ó
/// </summary>
/// <param name="price"></param>
/// <returns></returns>
public string GetOrderInfoWithOutEncode(string price)
{
PayInfo.Add("app_id", Config.app_id);
PayInfo.Add("biz_content", GetBizContent(price));
PayInfo.Add("charset", "utf-8");
PayInfo.Add("format", "json");
PayInfo.Add("method", "alipay.trade.app.pay");
PayInfo.Add("notify_url", "http://wxpay.lmx.ren/ResultNotify");
PayInfo.Add("sign_type", "RSA");
PayInfo.Add("timestamp", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
PayInfo.Add("version", "1.0");
string strUrl = BuildQueryWithOutEncode(PayInfo);
return strUrl;
}
/// <summary>
/// °üº¬EncodeµÄ×Ö·û´®Æ´½Ó
/// </summary>
/// <param name="price"></param>
/// <returns></returns>
public string GetOrderInfoWithEncode()
{
string strUrl = BuildQuery(PayInfo, "utf-8");
return strUrl;
}
/// <summary>
/// »ñÈ¡Ö§¸¶ÄÚÈÝÏêÇé
/// </summary>
/// <param name="total_amount"></param>
/// <returns></returns>
public string GetBizContent(string total_amount)
{
¡¡