Esempio n. 1
0
 public LineBotController(IOptions <AppSettings> options)
 {
     appsettings         = options.Value;
     lineMessagingClient = new LineMessagingClient(appsettings.LineBot.ChannelAccessToken);
     linePayClient       = new LinePayClient(
         appsettings.LinePay.ChannelId,
         appsettings.LinePay.ChannelSecret,
         appsettings.LinePay.IsSandbox);
 }
Esempio n. 2
0
        public PayController(IOptions <AppSettings> options)
        {
            appsettings = options.Value;

            // LinePay クライアントの作成
            client = new LinePayClient(
                appsettings.LinePay.ChannelId,
                appsettings.LinePay.ChannelSecret,
                appsettings.LinePay.IsSandbox);
        }
Esempio n. 3
0
        public PayController()
        {
            var builder = new ConfigurationBuilder()
                          .SetBasePath(Directory.GetCurrentDirectory())
                          .AddJsonFile("appsettings.json");

            configuration = builder.Build();

            client = new LinePayClient(
                configuration["LinePay:ChannelId"],
                configuration["LinePay:ChannelSecret"],
                bool.Parse(configuration["LinePay:IsSandbox"]));
        }
 public LinePayController(IOptions <AppSettings> config)
 {
     this._config = config.Value;
     this._client = new LinePayClient(_config.BaseAddress, _config.ChannelId);
 }
 public LineBotApp(LineMessagingClient lineMessagingClient, LinePayClient linePayClient, AppSettings appsettings)
 {
     this.messagingClient = lineMessagingClient;
     this.payClient       = linePayClient;
     this.appsettings     = appsettings;
 }