Using AuthorizeNet.APICore merchantAuthenticationType class does not have the property transactionkey

251 views Asked by At

I am using AuthorizeNet.APICore and after i upgraded my framework from .Net 4.0 to .Net 4.5 i received this error:

'AuthorizeNet.APICore.merchantAuthenticationType' does not contain a definition for 'transactionKey' and no extension method 'transactionKey' accepting a first argument of type 'AuthorizeNet.APICore.merchantAuthenticationType' could be found (are you missing a using directive or an assembly reference?)

This is a MVC Razor website application

I am including the references and imports:

using System.Xml; 
using System.Xml.Serialization;  
usingAuthorizeNet.APICore;

Here request is an instance of ANetApiRequest and the transactionkey property is throwing the error.

request.merchantAuthentication = new merchantAuthenticationType();
request.merchantAuthentication.name = ObjModel.APILoginId;
request.merchantAuthentication.transactionKey = ObjModel.TransactionKey;

I'm not sure where this error came from or how to fix it. any help?

0

There are 0 answers