Ejemplo 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);
 }
Ejemplo n.º 2
0
        public PayController(IOptions <AppSettings> options)
        {
            appsettings = options.Value;

            // LinePay クライアントの作成
            client = new LinePayClient(
                appsettings.LinePay.ChannelId,
                appsettings.LinePay.ChannelSecret,
                appsettings.LinePay.IsSandbox);
        }
Ejemplo 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);
 }
Ejemplo n.º 5
0
 public LineBotApp(LineMessagingClient lineMessagingClient, LinePayClient linePayClient, AppSettings appsettings)
 {
     this.messagingClient = lineMessagingClient;
     this.payClient       = linePayClient;
     this.appsettings     = appsettings;
 }