Skip to content

Commit

Permalink
Code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldwight committed Mar 15, 2021
1 parent a170549 commit 555e92b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Samples/MpesaSdk.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ public void ConfigureServices(IServiceCollection services)
Configuration.GetSection("MpesaApiConfiguration").Bind(options);
});

// Initializing mpesaclient httpclient instance using Dependency Injection
services.AddMpesaService();
// Initializing mpesaclient httpclient instance using Dependency Injection and specify the environment configuration
#if DEBUG
services.AddMpesaService(Enums.Environment.Sandbox);
#else
services.AddMpesaService(Enums.Environment.Live);
#endif
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
Expand Down

0 comments on commit 555e92b

Please sign in to comment.