dotnet add package Digiflow.Payment
{
"Digiflow": {
"PaymentApi": {
"BaseUrl": "https://ta.digiflowtech.com",
"Version": "1.0",
"MerchantId": "YOUR_MERCHANT_ID",
"TerminalId": "YOUR_TERMINAL_ID",
"SignKey": "YOUR_SIGN_KEY"
}
}
}
using Digiflow.Payment.Extensions;
ConfigureServices(IServiceCollection services, IConfiguration configuration)
{
// this injects as SINGLETON
services.AddDigiflowPaymentServices(configuration);
// you can also inject as SCOPED or TRANSIENT by specifying the ServiceLifetime
services.AddDigiflowPaymentServices(configuration, ServiceLifetime.Scoped);
}