Exemple #1
0
 /// <summary>
 /// 重置支付宝配置
 /// </summary>
 public static void ReSet()
 {
     _seller     = PluginUtils.GetPluginSet().Seller;
     _partner    = PluginUtils.GetPluginSet().Partner;
     _key        = PluginUtils.GetPluginSet().Key;
     _privatekey = PluginUtils.GetPluginSet().PrivateKey;
 }
Exemple #2
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);
            }
        }
Exemple #3
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;
            //_privatekey ="MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALQd0QZ2uURTwqipEQRQDhEPK3Ch6v6dtravaFoX7n4+ib0so2AnDbKboJxT8Uu4/e0RCmreA1d0ok/9kVPtlMwKeGuiP8E2xUsUvoVwg/SMT4U8yX9heb76BIZeNRRMgmkZYq1UsHApv+KOCnnHwXf/ud1fXucf9/irjBXRwznRAgMBAAECgYBwtsf7t4gwzgne6g4QGNj0q/2POoSIWcHhiNtQpfFFZ3ViwPBsV4Qm5WUY7x7tOBMPq75NKioFLKP2UsQDNYYLLQci1q/iCYINdpk6jaxH4yGNTlIO2WjFbANosXcSwaMQzdtE6uMCavA2P2Nm1hXM/0xSWiHiyDd7+de1rny9UQJBAN5U22bvR2AsAcKMRxH/vOUL4YA0K0W6G3B8C9G4HE3B2Lb1CmufstTx5SpkJY72sr4lHC8FJZ70sDv5SIKxRv8CQQDPZGgr0Sh1OMpUBvD/0ajJ1hnWZ43p0HmJIOF81aE50NpigLHgwFvEmKZtWiMGZu2SuEY0ZNxuf0Y695ocMc8vAkAeET3Gsu9lKy5lwBDQd1R1aWDqtKNxf5S8Zpo2l36EaYXEYGkzWtqVf80tKXQG3IgZvO0N0tVepNq8kZ7jxdPDAkEAkbga+a6cnsCoaSH3c8f8sNSekudv7zlsK83Oocf44Ia+6zdBxIlj8V7QkUUkFvt7MfwIWAgGWh1TW1teDTFyQQJAMDmusDcV0jV34NBJ1w2bJLaJ2+9WSqJITO7iWDnrsqCdacNI5MS0cv4gTei43DtYQKpxrSl8taAhKsqwZO5c+g==";// 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&";
        }