In Paytm for generating checksums for .NET, DLL must be imported but I cannot use the dll in ASP.NET Core. Please let me know how to generate and validate a checksum.
4 Answers
As Paytm has updated Checksum class and modified checksum generation methods. Latest Nuget Package with Latest DLL from Paytm
You can find Updated documentation for Paytm Payment Gateway API Here
Depending on the version of .NET Core you are running, you might need to import System.Security.Cryptography.Algorithms
That said, you can generate an MD5 Checksum with the following
using (var md5 = MD5.Create())
{
using (var stream = File.OpenRead(filename))
{
return Encoding.Default.GetString(md5.ComputeHash(stream));
}
}

- 2,012
- 4
- 25
- 35
You would need to use .NET Core 2.0 and paytm dll for .net 4.5 (link given below). https://github.com/Paytm-Payments/Paytm_Web_Sample_Kit_dotNet/tree/master/.net_4.5
.NET Core 2.0 supports adding .NET Framework libraries as a reference. You would need to use paytm dll version compiled with .net framework 4.5 or above in order to add it to a .net core 2.0 project.
This worked for me.

- 31
- 3
-
It is still tough to figure out how to use multiple targetted version. do you have any code samples to do the same? (An asp.net core app using paytm.dll .net 4.5 with ef core?) – Parv Sharma Nov 17 '17 at 10:07
you can find it here
https://www.nuget.org/packages/AstroBasic.PayTM.Library.NETCORE/
i have created this for my self, but feel free to use it.

- 36
- 5
-
A link-only answer with no short explanation is not recommended. – Ṃųỻịgǻňạcểơửṩ Feb 25 '19 at 01:45