Razorpay 3.1.2
See the version list below for details.
dotnet add package Razorpay --version 3.1.2
NuGet\Install-Package Razorpay -Version 3.1.2
<PackageReference Include="Razorpay" Version="3.1.2" />
paket add Razorpay --version 3.1.2
#r "nuget: Razorpay, 3.1.2"
// Install Razorpay as a Cake Addin #addin nuget:?package=Razorpay&version=3.1.2 // Install Razorpay as a Cake Tool #tool nuget:?package=Razorpay&version=3.1.2
Razorpay .NET SDK
Razorpay client .NET Api. The api follows the following practices
- Namespaced under Razorpay.Api .
- Client throws exceptions instead of returning errors.
- Options are passed as Dictionary instead of multiple arguments wherever possible.
- All requests and responses are communicated over JSON.
- A minimum of .Net 4.0 is required.
Installation
Using the NuGet Command Line Interface (CLI)
nuget install Razorpay
else
- Download Nuget package from here
- Package supports only .Net 4.0 and .net 4.7, Add the required version as reference to your project.
Usage
RazorpayClient
can be instantiated via two ways:
Using Private Auth
Instantiate RazorpayClient
with key_id
& key_secret
. You can obtain the keys from the dashboard app https://dashboard.razorpay.com/#/app/keys
RazorpayClient client = new RazorpayClient(key, secret);
Add custom headers to request (optional)
client.addHeader(string,string);
Using Access Token
Instantiate RazorpayClient
with access_token
. The access_token
can be obtained only in case if you are a platform partner. For more information, refer page - https://razorpay.com/docs/partners/platform/.
RazorpayClient client = new RazorpayClient(access_token);
Add custom headers to request (optional)
client.addHeader(string,string);
Supported Resources
Development
- Open solution in visual studio 2022, it should build fine
Ubuntu
Compiling using Mono
- Download the 'Newtonsoft.Json' nuget package.
nuget install Newtonsoft.Json -Version 13.0.3 -OutputDirectory packages
- Download the 'Portable.BouncyCastle' nuget package.
nuget install Portable.BouncyCastle -Version 1.9.0 -OutputDirectory packages
- Download the 'NUnit' nuget package.
nuget install NUnit -Version 3.6.1 -OutputDirectory packages
- Create a bin folder in the root directory
mkdir bin
- Compile the source code into a library
mcs -t:library -lib:"/usr/lib/mono/4.5" -r:"System.dll,System.Net.dll,System.Net.Http.dll,System.Core.dll,System.Xml.dll,System.Xml.Linq.dll,System.Core.dll,./packages/Newtonsoft.Json.13.0.3/lib/net45/Newtonsoft.Json.dll,./packages/Portable.BouncyCastle.1.9.0/lib/net40/BouncyCastle.Crypto.dll" -out:"bin/RazorpayClient.dll" ./src/**/*.cs -lib:/usr/lib/mono/2.0
- copy Dependency dll
cp packages/Newtonsoft.Json.13.0.3/lib/net45/Newtonsoft.Json.dll ./bin
cp packages/Portable.BouncyCastle.1.9.0/lib/net40/BouncyCastle.Crypto.dll ./bin
cp packages/NUnit.3.6.1/lib/net45/nunit.framework.dll ./bin
- Compile test exe
mcs -t:exe -lib:"/usr/lib/mono/4.5,./bin" -r:"RazorpayClient.dll,Newtonsoft.Json.dll,BouncyCastle.Crypto.dll,nunit.framework.dll" -out:"bin/RazorpayApiTest.exe" ./test/*.cs
- Run Test exe
mono bin/RazorpayApiTest.exe [key] [secret]
Compiling using xbuild
Run xbuild (in the root directory where sln file exist)
FAQ
- In case the last command fails with "invalid cert received from server", run below commands
- yes | certmgr -ssl -m https://go.microsoft.com
- yes | certmgr -ssl -m https://nugetgallery.blob.core.windows.net
- yes | certmgr -ssl -m https://myget.org
- yes | certmgr -ssl -m https://nuget.org
- mozroots --import --sync --quiet
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 is compatible. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- Newtonsoft.Json (>= 13.0.3)
- Portable.BouncyCastle (>= 1.9.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Razorpay:
Package | Downloads |
---|---|
SnkRazorPayHelper
SnkRazorPayHelper |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.1.3 | 12,174 | 6/24/2024 |
3.1.2 | 5,141 | 5/13/2024 |
3.1.1 | 5,209 | 2/29/2024 |
3.1.0 | 11,256 | 10/31/2023 |
3.0.2 | 24,337 | 10/19/2022 |
3.0.0 | 127,136 | 11/12/2018 |
2.2.0 | 16,046 | 1/9/2018 |
2.1.0 | 2,831 | 9/27/2017 |
2.0.0 | 9,032 | 7/6/2017 |
1.1.1 | 2,709 | 11/19/2016 |
1.1.0 | 2,641 | 6/2/2016 |
1.0.0 | 3,072 | 12/19/2015 |
Razorpay SDK for .Net v3