/// <summary> /// 构造函数 /// </summary> /// <param name="config"></param> protected WxPayBaseApi(WxPayCenterConfig config) { if (config == null && DefaultConfig == null) { throw new ArgumentNullException("config", "构造函数中的config 和 全局DefaultConfig 配置信息同时为空,请通过构造函数赋值,或者在程序入口处给 DefaultConfig 赋值!"); } _config = config; }
/// <summary> /// 设置上下文配置信息 /// </summary> /// <param name="config"></param> public static void SetContextConfig(WxPayCenterConfig config) { WxPayBaseApi.SetContextConfig(config); }