dotnet add package ZarinpalSharp --version 1.3.2
NuGet\Install-Package ZarinpalSharp -Version 1.3.2
<PackageReference Include="ZarinpalSharp" Version="1.3.2" />
paket add ZarinpalSharp --version 1.3.2
#r "nuget: ZarinpalSharp, 1.3.2"
// Install ZarinpalSharp as a Cake Addin #addin nuget:?package=ZarinpalSharp&version=1.3.2 // Install ZarinpalSharp as a Cake Tool #tool nuget:?package=ZarinpalSharp&version=1.3.2
.NET Standard 2.1 client for zarinpal api v4
Install from Nuget (⚠️ Not fully tested! but i did some on common methods)
For better understanding of what is this and why you should use this, please read Zarinpal docs
Using this package you can simply send a payment request with specified amount of money. customer will pay and you will verify!
See ConsoleApplication for a quick example
MerchantId from Zarinpal Panel
1- Create a client
// Putout your configurations: MerchantId or Token from https://next.zarinpal.com. // Default callback url var token = "YOUR_TOKEN_HERE"; var defaultCallbackUrl = "www.example.com"; // This can be overrided later. var configs = new ZarinpalConfiguration(token, defaultCallbackUrl); // Create main client var zarinClient = new ZarinClient(configs);
2- Send Requests like
// Request a payment var payRequest = await zarinClient.PaymentRequestAsync(20000, "I will pay for you"); // Get a link to pay gateway var gatewayLink = payRequest.GetStartPaymentUrl()
Almost everything is supported:
Currency and ...
Then take a look at WebApplication Example
Consider reading Wiki (even if it's empty).
|Product||Versions Compatible and additional computed target framework versions.|
|.NET||net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed.|
|.NET Core||netcoreapp3.0 was computed. netcoreapp3.1 was computed.|
|.NET Standard||netstandard2.1 is compatible.|
|MonoAndroid||monoandroid was computed.|
|MonoMac||monomac was computed.|
|MonoTouch||monotouch was computed.|
|Tizen||tizen60 was computed.|
|Xamarin.iOS||xamarinios was computed.|
|Xamarin.Mac||xamarinmac was computed.|
|Xamarin.TVOS||xamarintvos was computed.|
|Xamarin.WatchOS||xamarinwatchos was computed.|
- System.Text.Json (>= 6.0.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ZarinpalSharp:
An extension package to use ZarinpalSharp in Asp .Net
This package is not used by any popular GitHub repositories.