Skip to main content
Version: 4.0

Asan Pardakht

The Asan Pardakht gateway is included in the Parbad package.

Configuration​

builder.Services.AddParbad()
.ConfigureGateways(gateways =>
{
gateways
.AddAsanPardakht()
.WithAccounts(accounts =>
{
accounts.AddInMemory(account =>
{
account.MerchantConfigurationId = "<Your merchant configuration ID>";
account.UserName = "<Your username>";
account.Password = "<Your password>";
});
});
})
// ...

Payment request​

var result = await onlinePayment.RequestAsync(invoice =>
{
invoice
.SetAmount(amount)
.SetCallbackUrl(callbackUrl)
.UseAutoIncrementTrackingNumber()
.UseAsanPardakht();
});