public WeixinController(IBizMessageCryptService bizMessageCryptService, IConfiguration configuration, ILogger <WeixinController> logger, WeixinMpApi weixinMpApi)
 {
     _bizMessageCryptService = bizMessageCryptService;
     _configuration          = configuration;
     _logger      = logger;
     _weixinMpApi = weixinMpApi;
 }
Пример #2
0
        public WeixinMpApiTest()
        {
            WeixinServiceRegister.Register()
            .AddMpService();

            string appId     = "wxa60caa8a4543d3fa";
            string appSecret = "4f141b47bca5755a169d46584982186a";

            WeixinMpApiContainer.Register(new MPAccount()
            {
                AppId     = appId,
                AppSecret = appSecret,
            });

            MpApi = WeixinMpApiContainer.GetInstance("default");

            Console.WriteLine(MpApi.Token?.AccessToken);
        }
Пример #3
0
 public DataCubeApi(WeixinMpApi api)
 {
     _api = api;
 }
Пример #4
0
 public MediaApi(WeixinMpApi api)
 {
     _api = api;
 }
Пример #5
0
 public AccountApi(WeixinMpApi api)
 {
     _api = api;
 }
Пример #6
0
 public CommentApi(WeixinMpApi api)
 {
     _api = api;
 }
Пример #7
0
 public MenuApi(WeixinMpApi api)
 {
     _api = api;
 }
Пример #8
0
 public CommonApi(WeixinMpApi api)
 {
     _api = api;
 }
Пример #9
0
 public UserApi(WeixinMpApi api)
 {
     _api = api;
 }