예제 #1
0
        static WxPayConfig()
        {
            var _databaseInstance = new DatabaseInstance(new Database("ecard"));
            var ISetWeChatService = new SqlSetWeChatService(_databaseInstance);
            var item = ISetWeChatService.GeByFirst();

            if (item != null)
            {
                //WxPayAPI.Log.Debug("WxPayAPI.WxPayConfig", "回调url:" + WxPayConfig.USER_NOTIFY_URL);
                APPID                   = item.appID;
                MCHID                   = item.MCHID;
                KEY                     = item.MCHIDKEY;
                APPSECRET               = item.AppSecret;
                NOTIFY_URL              = item.NOTIFY_URL;
                USER_NOTIFY_URL         = item.USER_NOTIFY_URL;
                USERRegister_NOTIFY_URL = item.USERRegister_NOTIFY_URL;
                TOKEN                   = item.token;
            }
        }
예제 #2
0
파일: Config.cs 프로젝트: a864610877/src
        static WxPayConfig()
        {
            var _databaseInstance = new DatabaseInstance(new Database("ecard"));
            var ISetWeChatService = new SqlSetWeChatService(_databaseInstance);
            var item = ISetWeChatService.GeByFirst();

            if (item != null)
            {
                WxPayAPI.Log.Debug("WxPayAPI.WxPayConfig", "APPID:" + item.appID);
                APPID                   = item.appID;
                MCHID                   = item.MCHID;
                KEY                     = item.MCHIDKEY;
                APPSECRET               = item.AppSecret;
                NOTIFY_URL              = item.NOTIFY_URL;
                USER_NOTIFY_URL         = item.USER_NOTIFY_URL;
                USERRegister_NOTIFY_URL = item.USERRegister_NOTIFY_URL;
            }
            else
            {
                WxPayAPI.Log.Debug("WxPayAPI.WxPayConfig", "SetWeChat:为空");
            }
        }