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; } }
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:为空"); } }