Hi All,
Please any one help me...
how to integrate authorize.net AIM for any simple integration in MVC 5.
Previcous i done in php (integration for AIM) but know we want in .NET with MVC 5.
Please send any articles to integrate.
Thanks in Advance...
Mubeena
05-25-2017 02:28 AM
Hi,
You could check out the SDK https://github.com/AuthorizeNet/sdk-dotnet and the sample code at https://github.com/AuthorizeNet/sample-code-csharp
05-25-2017 03:09 AM - edited 05-25-2017 03:09 AM
Hi,
Thanks for your reponse...
am trying this url
http://samridhis.blogspot.in/2011/01/authorizenet-integration-ecommerce.html
but getting error in controller with response.Validate(....) here.
Thanks,
Mubeena
05-25-2017 03:17 AM
What is the error you are getting?
05-25-2017 03:22 AM
Am getting this errors in home controller
1) Error 1 'AuthorizeNet.SIMResponse' does not contain a definition for 'Validate' and no extension method 'Validate' accepting a first argument of type 'AuthorizeNet.SIMResponse' could be found (are you missing a using directive or an assembly reference?) C:\Users\mubee\documents\visual studio 2013\Projects\Authocsharp\Authocsharp\Controllers\HomeController.cs 22 36 Authocsharp
2) Error 2 'Authocsharp.Controllers.AuthorizeNET' does not contain a definition for 'Helpers' C:\Users\mubee\documents\visual studio 2013\Projects\Authocsharp\Authocsharp\Controllers\HomeController.cs 25 41 Authocsharp
05-25-2017 03:30 AM
The Validate method was removed from the SIMResponse. To enable it ...
The following should be added to : /Authorize.NET/AIM/Responses/SIMResponse.cs
public bool Validate(string merchantHash, string apiLogin) { return Crypto.IsMatch(merchantHash, apiLogin, this.TransactionID, this.Amount, this.MD5Hash); }
and the following should be added to : /Authorize.NET/Utility/Crypto.cs
public static bool IsMatch(string key, string apiLogin, string transactionID,decimal amount, string expected) { var unencrypted = string.Format("{0}{1}{2}{3}", key, apiLogin, transactionID, amount.ToString()); var md5 = new System.Security.Cryptography.MD5CryptoServiceProvider(); var hashed = Regex.Replace(BitConverter.ToString(md5.ComputeHash(ASCIIEncoding.Default.GetBytes(unencrypted))), "-", ""); return hashed.Equals(expected); }
05-25-2017 04:17 AM
Hi,
i added like you said but am getting null from 'response' like message, approved - false, response code,MD5Hash = null all variable getting null.
Thanks,
Mubeena
05-25-2017 10:22 PM