I have one C# code page with all of my Authorize.Net functions on it. In each function i have to have
ApiOperationBase<ANetApiRequest, ANetApiResponse>.RunEnvironment = AuthorizeNet.Environment.SANDBOX; ApiOperationBase<ANetApiRequest, ANetApiResponse>.MerchantAuthentication = new merchantAuthenticationType() { name = ApiLoginID, ItemElementName = ItemChoiceType.transactionKey, Item = ApiTransactionKey, };
Is there some way i can add this to the top of the page, in private variables? Is it possible to pass in the ApiOperationBase information, so i dont have to repeat the code in every function?
Thanks
01-10-2018 07:19 AM
Hi
ApiOperationBase is the base class used for all API calls and its has 2 static properties
RunEnvironment & MerchantAuthentication which can be set only once and need not be in each function.
Hope this help !
01-11-2018 05:51 AM