پرش به مطلب اصلی
نسخه: 4.0

ایران کیش

dotnet add package Parbad.Gateway.IranKish

درگاه ایران کیش برای پرباد، کتابخانه پرداخت آنلاین ‎.NET.

پیکربندی​

builder.Services.AddParbad()
.ConfigureGateways(gateways =>
{
gateways
.AddIranKish()
.WithAccounts(accounts =>
{
accounts.AddInMemory(account =>
{
account.TerminalId = "<Your terminal ID>";
account.AcceptorId = "<Your acceptor ID>";
account.PassPhrase = "<Your pass phrase>";
account.PublicKey = "<The RSA public key that Iran Kish gave you, in PEM format>";
});
});
})
// ...

درخواست پرداخت​

var result = await onlinePayment.RequestAsync(invoice =>
{
invoice
.SetAmount(amount)
.SetCallbackUrl(callbackUrl)
.UseAutoIncrementTrackingNumber()
.SetIranKishAdditionalData(new IranKishGatewayAdditionalData
{
MobileNumberOrEmail = "09121234567" // Optional
})
.UseIranKish();
});