Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 1.2 KB

README.md

File metadata and controls

51 lines (37 loc) · 1.2 KB

BmlConnect

A simple .NET client for BML payment gateway.

Installation

Install via NuGet:

dotnet add package Creobe.BmlConnect

Usage with Dependency Injection

// ...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"));

Building

Build the project locally:

dotnet build --configuration Release

Publishing

When you push a version tag, GitHub Actions workflow will publish the package to NuGet automatically.

License

This project is licensed under the MIT License - see the LICENSE file for details