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); }
public PayController(IOptions <AppSettings> options) { appsettings = options.Value; // LinePay クライアントの作成 client = new LinePayClient( appsettings.LinePay.ChannelId, appsettings.LinePay.ChannelSecret, appsettings.LinePay.IsSandbox); }
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; }