Labels

slider

Recent

Navigation

How to install and use Razor payment in .Net

Know How to install & use Razor payment app? The installation procedure of Razorpay client .NET Api could help you in implementing secured payment
How to install and use Razor payment in .Net

Introduction

The Razorpay .NET SDK is a .NET based SDK that is designed to provide developers in developing applications that can interact with Razorpay's APIs. By installing the Razorpay .NET SDK (server-side), we'll be able to interact with Razorpay APIs.Installation procedure of Razorpay .NET SDK

By installing the Razorpay .NET SDK (server-side-side), we'll be able to interact with Razorpay APIs.

The developers can organize installation of the Razorpay .NET SDK and make integration of the same with .NET-made website to receive payments, make refunds and do other transactions.

Required components

Utilize the higher version of .NET 4.5 with TLS (version 1.2).

TLS (version 1.2) performs only with .NET version 4.5. By utilizing it with a lower version of .NET will create errors. Check the

Steps to download and install Razorpay .NET SDK

First you need to Create or sign up with a Razorpay account.

Then Log into the Dashboard of Razorpay and produce the API keys in test procedure.

Installation of Razorpay through the NuGet Package Manager

You can get installed Razorpay through the NuGet Package Manager

 or through the NET Core CLI (Command-Line Interface).

By NuGet Package Manager

To get the SDK installed through NuGet Package Manager, first get the latest source code downloaded in zip file format from the releases link on GitHub.

The ‘NuGet Package Manager' needs to be downloaded and installed.

The ‘NuGet Package Manager' is only compatible with .NET 4.0 and higher version. Make sure that you have selected the right applicable version of .NET that needs to be installed.

Start Running the following command lines on the ‘NuGet Package Manager': 

Namespaced within Razorpay.Api.

The .NET client displays exceptions rather than returning errors.

Options are selected as a Dictionary rather than multiple parameters, wherever feasible.

All proposals and responses are transmitted over JSON.

Please note: You must possess .NET Core CLI that is installed on your system to utilize this method.

To get the SDK installed from the following command prompt:

the latest source code file needs to be downloaded from the nuget.org.

Run the following command:

Note:

On failure of the above command with invalid cert obtained from server, start running the following commands:

Certification Manager commands

Integrations

Integrate with Payment Gateway

API Sample Codes

Initialize

Get Payments

Get Payment using Id

Capture a payment

Refund a payment

In order yo refund payment following codes need to be executed.

Fetch All Refunds for a payment

Fetch One Refund for a payment using refund id

Accessing the payment attributes

Creating an order

Create a Customer

Development platform

Just open the solution in visual studio 2013 (if you have), it should develop fine

Ubuntu

Compiling using Mono

Download the 'Newtonsoft.Json' nuget package.

Download the 'NUnit' nuget package.

A bin folder needs to be created in the root directory

Compile the source code into a library

copy Dependency dll

Compile test exe

Run Test exe

Compiling through xbuild

Run xbuild (in the root directory where sln file exist)

In case the above command fails with message "invalid cert received from server", run the following commands

Conclusion: 

Hope the abov article will help the develpers developing a proper razor payment sdk app and they can take the advantage of razor payment app.

Share

Anjan kant

Outstanding journey in Microsoft Technologies (ASP.Net, C#, SQL Programming, WPF, Silverlight, WCF etc.), client side technologies AngularJS, KnockoutJS, Javascript, Ajax Calls, Json and Hybrid apps etc. I love to devote free time in writing, blogging, social networking and adventurous life

Post A Comment:

0 comments: