sample-code-csharp
sample-code-csharp copied to clipboard
Sample code for creating Subscription code doesn't resolve ANetApiRequest
ApiOperationBase<ANetApiRequest, ANetApiResponse>.RunEnvironment = AuthorizeNet.Environment.SANDBOX;
This line from the sample code gives the error: ANetApiRequest is an ambiguous reference between 'AuthorizeNet.ApiCore.ANetApiRequest' and 'AuthorizeNet.Api.Contracts.V1.ANetApiRequest'
If I try to fully qualify the reference, it says 'ApiCore' namespace not found and 'Api' reference not found, respectively.
Can you tell me which solution file you opened? Also, which version of the SDK are you using?
The namespace 'AuthorizeNet.ApiCore.ANetApiRequest' appears in the .Net Core SDK whereas the namespace 'AuthorizeNet.Api.Contracts.V1.ANetApiRequest' appears in the .Net v4.6.1 SDK.
You should ideally be using only one reference at a time.