cancel
Showing results for 
Search instead for 
Did you mean: 

Hello World Error: ApiOperationBase<TQ,TS> requires 2 type arguments

I've followed the instructions for Hello World via C# from here:http://developer.authorize.net/hello_world/

 

But I get an error with this sample code here:

Line 18: ApiOperationBase.RunEnvironment = AuthorizeNet.Environment.SANDBOX;

 

And the error is:

Using the generic type 'AuthorizeNet.Api.Controllers.Bases.ApiOperationBase<TQ,TS>' requires 2 type arguments

 

I simply copied and pasted the code, so I know it shouldn't be doing this. I already did step 1 of "Install-Package AuthorizeNet".

 
rockon77
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions
RaynorC1emen7
Expert
5 REPLIES 5

https://github.com/AuthorizeNet/sdk-dotnet

look like they change the code

RaynorC1emen7
Expert

Ah! I see. Thank you.

Now I am getting this error...

 

Environment not set. Set environment using setter or use overloaded method to pass appropriate environment

 

for this line...

 

Line 42: controller.Execute();

I am not finding the tutorial provided by Authorize.Net to be very helpful for initial testing. Also I am using ASP.NET Forms, not MVC.

rockon77
Contributor

Has anyone got the fix for this? Direct out of the demo code:

 controller.Execute();
        throws    //Environment not set. Set environment using setter or use overloaded method to pass appropriate environment