private static string _veryfyurl = ""; //支付宝消息验证地址 static AlipayConfig() { _seller = PluginUtils.GetPluginSet().Seller; _partner = PluginUtils.GetPluginSet().Partner; _key = PluginUtils.GetPluginSet().Key; _code = Encoding.GetEncoding("utf-8"); _inputcharset = "utf-8"; _signtype = "MD5"; _gateway = "https://mapi.alipay.com/gateway.do?"; _veryfyurl = "https://mapi.alipay.com/gateway.do?service=notify_verify&"; }
/// <summary> /// 获得支付手续费 /// </summary> /// <param name="productAmount">商品合计</param> /// <param name="buyTime">购买时间</param> /// <param name="partUserInfo">购买用户</param> /// <returns></returns> public decimal GetPayFee(decimal productAmount, DateTime buyTime, PartUserInfo partUserInfo) { PluginSetInfo pluginSetInfo = PluginUtils.GetPluginSet(); if (productAmount >= pluginSetInfo.FreeMoney) { return(0M); } else { return(pluginSetInfo.PayFee); } }
/// <summary> /// 重置支付宝配置 /// </summary> public static void ReSet() { _seller = PluginUtils.GetPluginSet().Seller; _partner = PluginUtils.GetPluginSet().Partner; _key = PluginUtils.GetPluginSet().Key; }