Sepehr
dotnet add package Parbad.Gateway.Sepehr
The Sepehr gateway for Parbad, the online payment library for .NET.
Configuration
builder.Services.AddParbad()
.ConfigureGateways(gateways =>
{
gateways
.AddSepehr()
.WithAccounts(accounts =>
{
accounts.AddInMemory(account =>
{
account.TerminalId = 12345678;
});
});
})
// ...
Payment request
var result = await onlinePayment.RequestAsync(invoice =>
{
invoice
.SetAmount(amount)
.SetCallbackUrl(callbackUrl)
.UseAutoIncrementTrackingNumber()
.UseSepehr();
});
Verification result
The TransactionCode of a successful verification is the RRN, the reference number that Sepehr shows the customer.
verifyResult.GetSepehrAdditionalData() returns the other data of Sepehr's verification.