ShurjopayPlugin 0.1.1

dotnet add package ShurjopayPlugin --version 0.1.1
NuGet\Install-Package ShurjopayPlugin -Version 0.1.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ShurjopayPlugin" Version="0.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ShurjopayPlugin --version 0.1.1
#r "nuget: ShurjopayPlugin, 0.1.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ShurjopayPlugin as a Cake Addin
#addin nuget:?package=ShurjopayPlugin&version=0.1.1

// Install ShurjopayPlugin as a Cake Tool
#tool nuget:?package=ShurjopayPlugin&version=0.1.1

shurjoPay .NET Package (plugin)

.Net .Nuget downloads license

Official shurjoPay .net package (plugin) for merchants or service providers to connect with shurjoPay Payment Gateway v2.1 developed and maintained by shurjoMukhi Limited.

This plugin package can be used with .NET Standert 2.1 applications (e.g. .NET Core - MVC, Web API etc.).

This plugin package makes it easy for you to integrate with shurjoPay v2.1 with just three method calls:

  • MakePayment()
  • VerifyPayment()
  • CheckPayemnt()

Also reduces many of the things that you had to do manually

  • Handles http request and errors
  • JSON serialization and deserialization
  • Authentication during checkout and verification of payments

Audience

This document is intended for the developers and technical personnel of merchants and service providers who want to integrate the shurjoPay online payment gateway using .net framework.

How to use this shurjoPay Plugin

Use Package Manager to install this plugin inside your project environment.

Install-Package ShurjopayPlugin

Add Shurjopay Configuration to your project's user secrets Here is a sample user-secrects configuration.

"Shurjopay": {
    "SP_USERNAME": "sp_sandbox",
    "SP_PASSWORD": "pyyk97hu&6u6",
    "SP_CALLBACK": "https://www.sandbox.shurjopayment.com/response",
    "SP_ENDPOINT": "https://sandbox.shurjopayment.com/api/"
    "SP_PREFIX": "sp-dotnet"
  }

Add the Configuration in Program.cs file.

// Shurjopay Secrets
builder.Services.Configure<ShurjopayConfig>(builder.Configuration.GetSection("Shurjopay"));

Instantiate ShurjopayPlugin with Shurjopay Configuration and Logger

 private readonly ILogger<ShurjopayPlugin> _logger;
 public ShurjopayPlugin _ShurjopayPlugin;
 public ShurjopayController(IOptions<ShurjopayConfig> options, ILogger<ShurjopayPlugin> logger)
 {
    _ShurjopayPlugin = new ShurjopayPlugin(options.Value,logger);
    _logger = logger;
 }

Sample Payment Request Object

PaymentRequest paymentRequest = new PaymentRequest();
paymentRequest.Amount = 10;
paymentRequest.Prefix = "sp-dotnet";
paymentRequest.OrderID= "sp-dotnet-6.00";
paymentRequest.Currency= "BDT";
paymentRequest.CustomerName= "Mahabubul";
paymentRequest.CustomerAddress= "Haque Tower,Mohakhali";
paymentRequest.CustomerCity= "Dhaka";
paymentRequest.CustomerPhone = "01311310975";
paymentRequest.CustomerPostCode = "1229";

Make Payment Request

Task<PaymentDetails?> paymentDetailsTask = _ShurjopayPlugin.MakePayment(paymentRequest);
PaymentDetails? paymentDetails = paymentDetailsTask.Result;
return Redirect(paymentDetails.CheckOutUrl);

Payment verification can be done after each transaction with shurjopay order id.

  Task<VerifiedPayment?> TVerfiedPayment = _ShurjopayPlugin.VerifyPayment(order_id);
  VerifiedPayment? verifiedPayment = TVerfiedPayment.Result;
That's all! Now you are ready to use the python plugin to seamlessly integrate with shurjoPay to make your payment system easy and smooth.

References

  1. .Net Core Web MVC example application showing usage of the .Net plugin.
  2. Sample applications and projects in many different languages and frameworks showing shurjopay integration.
  3. shurjoPay Postman site illustrating the request and response flow using the sandbox system.
  4. shurjopay Plugins home page on github

License

This code is under the MIT open source License.

Please contact with shurjoPay team for more detail.
Product 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.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.1 296 1/13/2023
0.1.0 265 1/11/2023