Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 7
Registered: ‎08-02-2016
Accepted Solution

E00059:The authentication type is not allowed for this method call. Getting Subscription Status

I'm trying to get the status of a subscription using the .NET SDK and I'm getting the following error message on my controller:

 

E00059:The authentication type is not allowed for this method call.

 

This is the code I'm using:

 

var authorizeLoginId = ConfigurationManager.AppSettings["authorizeLoginId"];
var authorizeTransactionKey = ConfigurationManager.AppSettings["authorizeTransactionKey"];


ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = new merchantAuthenticationType()
{
    name = authorizeLoginId,
    ItemElementName = ItemChoiceType.transactionKey,
    Item = authorizeTransactionKey,
};

ApiOperationBase<ANetApiRequest, ANetApiResponse>.RunEnvironment = AuthorizeNet.Environment.SANDBOX;


var request = new ARBGetSubscriptionStatusRequest { subscriptionId = subscriptionId };

var controller = new ARBGetSubscriptionStatusController(request);                          // instantiate the contoller that will call the service
controller.Execute();

if (controller.GetResultCode() == messageTypeEnum.Error)
{
    telemetry.TrackTrace("Error getting subscription status: " + subscriptionId, Microsoft.ApplicationInsights.DataContracts.SeverityLevel.Error, controller.GetResults().Select((x, i) => new { Item = x, Index = i }).ToDictionary(x => x.Item, x => "Message" + x.Index));
    return null;
}

Any thoughts?


Accepted Solutions
Solution
Accepted by topic author joe_coolish
‎08-20-2016 11:52 AM
Member
Posts: 7
Registered: ‎08-02-2016

Re: E00059:The authentication type is not allowed for this method call. Getting Subscription Status

D'oh!  I was using the prod key in the sandbox!  Make sure to use the right key!

View solution in original post


All Replies
Posts: 2,765
Topics: 57
Kudos: 272
Blog Posts: 67
Registered: ‎12-05-2011

Re: E00059:The authentication type is not allowed for this method call. Getting Subscription Status

@joe_coolish

 

Are you using the API Login with the transaction key?  You cannot use a user's Login ID.

 

Richard

Member
Posts: 7
Registered: ‎08-02-2016

Re: E00059:The authentication type is not allowed for this method call. Getting Subscription Status

I basically copied the example code from the GitHub repo here:

 

https://github.com/AuthorizeNet/sample-code-csharp/blob/master/RecurringBilling/GetSubscriptionStatu...

 

What should I be using?

Solution
Accepted by topic author joe_coolish
‎08-20-2016 11:52 AM
Member
Posts: 7
Registered: ‎08-02-2016

Re: E00059:The authentication type is not allowed for this method call. Getting Subscription Status

D'oh!  I was using the prod key in the sandbox!  Make sure to use the right key!