BuyEngine.Payment.Stripe (1.0.0-pre.10)
Installation
dotnet nuget add source --name wamplerj --username your_username --password your_token https://git.wampler.us/api/packages/wamplerj/nuget/index.jsondotnet add package --source wamplerj --version 1.0.0-pre.10 BuyEngine.Payment.StripeAbout this package
Stripe payment provider for BuyEngine, implemented with the Stripe.net SDK.
BuyEngine
BuyEngine is a .NET library designed to provide a simple, but fully-featured, e-commerce capability to new or existing .NET projects using patterns and technologies that are already familiar to .NET developers
Plenty of turnkey e-commerce solutions exist across languages and stacks. But rather than reinventing the wheel building e-commerce into an existing app, or fighting an e-commerce product's plugin/customization model to bend it to your needs, BuyEngine takes a different approach: use your existing toolset and workflow. No custom templating language, no custom execution or hosting model — just a library you add to a normal .NET project.
Roadmap
Version 0.1 - Basic Product Management functionality (Products, Suppliers, Brands)Version 0.2 - Cart ManagementVersion 0.3 - SQL Data Provider, Testing Improvements- ~~Version 0.4 - Product Browse By Brand, Search
- ~~Version 0.5 - Payment Processing - Stripe, Paypal, and Square
- Version 0.6 - Shipping Providers
- Version 0.7 - Additional Data Providers (MongoDb, CosomoDb)
- Version 0.8 - API Security and documentation
Further Out
- L10N
- Tax Calculators
Configuration
AddBuyEngine is the front door for wiring BuyEngine into a host's IServiceCollection. It registers Catalog + Checkout with their sensible defaults (EF InMemory, store-pickup shipping, PayAtStorePaymentProvider), then hands you a BuyEngineBuilder to opt into providers from add-on packages:
services.AddBuyEngine(cfg =>
{
cfg.UseSqlServer(sql => sql.ConnectionStringName = "BuyEngine"); // BuyEngine.Data.Sql
cfg.UseStripeForPayment(pay => pay.ApiKeyName = "Stripe:ApiKey"); // BuyEngine.Payment.Stripe
cfg.UseWebApi(web => web.HostPrefix = "be-api"); // BuyEngine.WebApi
});
// ...
app.MapBuyEngineWebApi(); // reads the HostPrefix configured above
Each Use* method lives in the package it configures (core has no reference to BuyEngine.Data.Sql, .WebApi, or any payment package) and is an extension on BuyEngineBuilder, so only the packages you reference show up as options. Use*ForPayment methods are mutually exclusive - configuring a second payment provider throws, matching the "one provider wins" behavior of the underlying IPaymentProvider registration.
*Name-suffixed options (ConnectionStringName, ApiKeyName, ...) are resolved from IConfiguration at first use, so the host can add configuration sources after calling AddBuyEngine. The plain-value options (ConnectionString, ApiKey, ...) are used verbatim - set one or the other, never both.
The original à-la-carte methods (AddCatalogServices(), AddCheckoutServices(), AddSqlDataServices(...), AddStripePaymentServices(...), AddBuyEngineWebApiServices(), ...) remain available for hosts that don't want the builder.