A simple .NET client for BML payment gateway.
Install via NuGet:
dotnet add package Creobe.BmlConnect
// ...existing code...
using Microsoft.Extensions.DependencyInjection;
using Creobe.BmlConnect;
// ...existing code...
var services = new ServiceCollection();
services.AddBmlConnect(options =>
{
// Configure options here
options.AppId = "YOUR_APP_ID";
options.ApiKey = "YOUR_API_KEY";
options.ApiVersion = "v1";
options.AppVersion = "1.0.0";
options.Endpoint = "https://example.com";
});
var serviceProvider = services.BuildServiceProvider();
var bmlClient = serviceProvider.GetRequiredService<BmlConnectClient>();
var transaction = await bmlClient.CreateTransactionAsync(new CreateTransactionRequest(
10.00m, "MVR", "REF123", "LOCAL123", "demoProvider", "https://your-redirect.url"));
Build the project locally:
dotnet build --configuration Release
When you push a version tag, GitHub Actions workflow will publish the package to NuGet automatically.
This project is licensed under the MIT License - see the LICENSE file for details