Beispiel #1
0
 /// <summary>
 /// 重置支付宝配置
 /// </summary>
 public static void ReSet()
 {
     _seller     = PluginUtils.GetPluginSet().Seller;
     _partner    = PluginUtils.GetPluginSet().Partner;
     _key        = PluginUtils.GetPluginSet().Key;
     _privatekey = PluginUtils.GetPluginSet().PrivateKey;
 }
Beispiel #2
0
        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&";
        }
Beispiel #3
0
        /// <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);
            }
        }
Beispiel #4
0
        private static string _appveryfyurl    = ""; //app支付宝消息验证地址

        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&";

            _privatekey      = PluginUtils.GetPluginSet().PrivateKey;
            _publickey       = @"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQEB/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5KsiNG9zpgmLCUYuLkxpLQIDAQAB";
            _appinputcharset = "utf-8";
            _appsigntype     = "RSA";
            _appveryfyurl    = "https://mapi.alipay.com/gateway.do?service=notify_verify&";
        }