├── .github └── workflows │ └── dotnet-workflow.yml ├── .gitignore ├── .gitmodules ├── .travis.yml ├── Authorize.NET ├── Api │ ├── Contracts │ │ └── V1 │ │ │ ├── AnetApiSchema.generated.cs │ │ │ ├── RequestFactoryWithSpecified.cs │ │ │ └── RequestFactoryWithSpecified.generated.org │ ├── ControllerTemplate.cst │ └── Controllers │ │ ├── ARBCancelSubscriptionController.cs │ │ ├── ARBCreateSubscriptionController.cs │ │ ├── ARBGetSubscriptionController.cs │ │ ├── ARBGetSubscriptionListController.cs │ │ ├── ARBGetSubscriptionStatusController.cs │ │ ├── ARBUpdateSubscriptionController.cs │ │ ├── Bases │ │ ├── ApiOperationBase.cs │ │ ├── ErrorResponse.cs │ │ └── IApiOperation.cs │ │ ├── authenticateTestController.cs │ │ ├── createCustomerPaymentProfileController.cs │ │ ├── createCustomerProfileController.cs │ │ ├── createCustomerProfileFromTransactionController.cs │ │ ├── createCustomerProfileTransactionController.cs │ │ ├── createCustomerShippingAddressController.cs │ │ ├── createFingerPrintController.cs │ │ ├── createProfileController.cs │ │ ├── createTransactionController.cs │ │ ├── decryptPaymentDataController.cs │ │ ├── deleteCustomerPaymentProfileController.cs │ │ ├── deleteCustomerProfileController.cs │ │ ├── deleteCustomerShippingAddressController.cs │ │ ├── getAUJobDetailsController.cs │ │ ├── getAUJobSummaryController.cs │ │ ├── getBatchStatisticsController.cs │ │ ├── getCustomerPaymentProfileController.cs │ │ ├── getCustomerPaymentProfileListController.cs │ │ ├── getCustomerPaymentProfileNonceController.cs │ │ ├── getCustomerProfileController.cs │ │ ├── getCustomerProfileIdsController.cs │ │ ├── getCustomerShippingAddressController.cs │ │ ├── getHostedPaymentPageController.cs │ │ ├── getHostedProfilePageController.cs │ │ ├── getMerchantDetailsController.cs │ │ ├── getSettledBatchListController.cs │ │ ├── getTransactionDetailsController.cs │ │ ├── getTransactionListController.cs │ │ ├── getTransactionListForCustomerController.cs │ │ ├── getUnsettledTransactionListController.cs │ │ ├── isAliveController.cs │ │ ├── logoutController.cs │ │ ├── mobileDeviceLoginController.cs │ │ ├── mobileDeviceRegistrationController.cs │ │ ├── securePaymentContainerController.cs │ │ ├── sendCustomerTransactionReceiptController.cs │ │ ├── transactionController.cs │ │ ├── transactionResponseEmvController.cs │ │ ├── updateCustomerPaymentProfileController.cs │ │ ├── updateCustomerProfileController.cs │ │ ├── updateCustomerShippingAddressController.cs │ │ ├── updateHeldTransactionController.cs │ │ ├── updateMerchantDetailsController.cs │ │ ├── updateSplitTenderGroupController.cs │ │ └── validateCustomerPaymentProfileController.cs ├── AuthorizeNET.csproj ├── Environment.cs ├── MarketType.cs ├── Properties │ └── AssemblyInfo.cs ├── TestFriends.cs ├── Util │ ├── Constants.cs │ ├── EnumHelper.cs │ ├── HtmlHelper.cs │ ├── HttpUtility.cs │ ├── LogHelper.cs │ ├── SensitiveDataConfigType.cs │ ├── SensitiveDataConsoleLogger.cs │ ├── SensitiveDataTextLogger.cs │ ├── StringUtils.cs │ └── XmlUtility.cs └── Utility │ ├── AnetApiSchema.generated.cs │ ├── AnetRandom.cs │ ├── ApiFields.cs │ └── CryptoRandom.cs ├── AuthorizeNET.sln ├── AuthorizeNET.vsmdi ├── AuthorizeNETtest ├── Api │ ├── ControllerTemplateTest.cst │ └── Controllers │ │ ├── MockTest │ │ ├── ARBCancelSubscriptionControllerTest.cs │ │ ├── ARBCreateSubscriptionControllerTest.cs │ │ ├── ARBGetSubscriptionControllerTest.cs │ │ ├── ARBGetSubscriptionListControllerTest.cs │ │ ├── ARBGetSubscriptionStatusControllerTest.cs │ │ ├── ARBUpdateSubscriptionControllerTest.cs │ │ ├── authenticateTestControllerTest.cs │ │ ├── createCustomerPaymentProfileControllerTest.cs │ │ ├── createCustomerProfileControllerTest.cs │ │ ├── createCustomerProfileFromTransactionControllerTest.cs │ │ ├── createCustomerProfileTransactionControllerTest.cs │ │ ├── createCustomerShippingAddressControllerTest.cs │ │ ├── createFingerPrintControllerTest.cs │ │ ├── createProfileControllerTest.cs │ │ ├── createTransactionControllerTest.cs │ │ ├── decryptPaymentDataControllerTest.cs │ │ ├── deleteCustomerPaymentProfileControllerTest.cs │ │ ├── deleteCustomerProfileControllerTest.cs │ │ ├── deleteCustomerShippingAddressControllerTest.cs │ │ ├── getAUJobDetailsControllerTest.cs │ │ ├── getAUJobSummaryControllerTest.cs │ │ ├── getBatchStatisticsControllerTest.cs │ │ ├── getCustomerPaymentProfileControllerTest.cs │ │ ├── getCustomerPaymentProfileListControllerTest.cs │ │ ├── getCustomerProfileControllerTest.cs │ │ ├── getCustomerProfileIdsControllerTest.cs │ │ ├── getCustomerShippingAddressControllerTest.cs │ │ ├── getHostedPaymentPageControllerTest.cs │ │ ├── getHostedProfilePageControllerTest.cs │ │ ├── getMerchantDetailsControllerTest.cs │ │ ├── getSettledBatchListControllerTest.cs │ │ ├── getTransactionDetailsControllerTest.cs │ │ ├── getTransactionListControllerTest.cs │ │ ├── getTransactionListForCustomerControllerTest.cs │ │ ├── getUnsettledTransactionListControllerTest.cs │ │ ├── isAliveControllerTest.cs │ │ ├── logoutControllerTest.cs │ │ ├── mobileDeviceLoginControllerTest.cs │ │ ├── mobileDeviceRegistrationControllerTest.cs │ │ ├── securePaymentContainerControllerTest.cs │ │ ├── sendCustomerTransactionReceiptControllerTest.cs │ │ ├── transactionControllerTest.cs │ │ ├── transactionResponseEmvControllerTest.cs │ │ ├── updateCustomerPaymentProfileControllerTest.cs │ │ ├── updateCustomerProfileControllerTest.cs │ │ ├── updateCustomerShippingAddressControllerTest.cs │ │ ├── updateHeldTransactionControllerTest.cs │ │ ├── updateMerchantDetailsControllerTest.cs │ │ ├── updateSplitTenderGroupControllerTest.cs │ │ └── validateCustomerPaymentProfileControllerTest.cs │ │ ├── SampleTest │ │ ├── ArbSubscriptionSampleTest.cs │ │ ├── CreateCustomerProfileFromTransactionSampleTest.cs │ │ ├── CreateTransactionSampleTest.cs │ │ ├── CustomerProfileSampleTest.cs │ │ ├── ErrorMessagesSampleTest.cs │ │ └── eCheckTransactionSampleTest.cs │ │ └── Test │ │ ├── APIInvalidCredentials.cs │ │ ├── AllGeneratedEnumTest.cs │ │ ├── ApiCoreTestBase.cs │ │ ├── ArbSubscriptionTest.cs │ │ └── CreateTransactionTest.cs ├── App.config ├── AuthorizeNETtest.csproj ├── BaseTest.cs ├── NMock3 │ ├── NMock3 Cheat Sheet.pdf │ └── NMockTest.cs ├── Properties │ └── AssemblyInfo.cs ├── UnitTestData.cs ├── WebRequestLocal.cs └── packages.config ├── AuthorizeNet.nuspec ├── CONTRIBUTING.md ├── LICENSE.txt ├── LocalTestRun.testrunconfig ├── MIGRATING.md ├── NUnit-2.6.3 ├── Logo.ico ├── bin │ ├── NUnitFitTests.html │ ├── NUnitTests.config │ ├── NUnitTests.nunit │ ├── TestResult-net-3.5.xml │ ├── agent.conf │ ├── agent.log.conf │ ├── framework │ │ ├── nunit.framework.dll │ │ ├── nunit.framework.xml │ │ ├── nunit.mocks.dll │ │ └── pnunit.framework.dll │ ├── launcher.log.conf │ ├── lib │ │ ├── Images │ │ │ ├── Ellipsis.gif │ │ │ ├── Tree │ │ │ │ ├── Circles │ │ │ │ │ ├── Failure.jpg │ │ │ │ │ ├── Ignored.jpg │ │ │ │ │ ├── Inconclusive.jpg │ │ │ │ │ ├── Skipped.jpg │ │ │ │ │ └── Success.jpg │ │ │ │ ├── Classic │ │ │ │ │ ├── Failure.jpg │ │ │ │ │ ├── Ignored.jpg │ │ │ │ │ ├── Inconclusive.jpg │ │ │ │ │ ├── Skipped.jpg │ │ │ │ │ └── Success.jpg │ │ │ │ ├── Default │ │ │ │ │ ├── Failure.png │ │ │ │ │ ├── Ignored.png │ │ │ │ │ ├── Inconclusive.png │ │ │ │ │ ├── Skipped.png │ │ │ │ │ └── Success.png │ │ │ │ └── Visual Studio │ │ │ │ │ ├── Failure.png │ │ │ │ │ ├── Ignored.png │ │ │ │ │ ├── Inconclusive.png │ │ │ │ │ ├── SeriousWarning.png │ │ │ │ │ ├── Skipped.png │ │ │ │ │ └── Success.png │ │ │ ├── pinned.gif │ │ │ └── unpinned.gif │ │ ├── NSubstitute.dll │ │ ├── NSubstitute.xml │ │ ├── Rhino.Mocks.dll │ │ ├── Rhino.Mocks.xml │ │ ├── log4net.dll │ │ ├── nunit-console-runner.dll │ │ ├── nunit-gui-runner.dll │ │ ├── nunit.core.dll │ │ ├── nunit.core.interfaces.dll │ │ ├── nunit.uiexception.dll │ │ ├── nunit.uikit.dll │ │ └── nunit.util.dll │ ├── nunit-agent-x86.exe │ ├── nunit-agent-x86.exe.config │ ├── nunit-agent.exe │ ├── nunit-agent.exe.config │ ├── nunit-console-x86.exe │ ├── nunit-console-x86.exe.config │ ├── nunit-console.exe │ ├── nunit-console.exe.config │ ├── nunit-editor.exe │ ├── nunit-x86.exe │ ├── nunit-x86.exe.config │ ├── nunit.exe │ ├── nunit.exe.config │ ├── nunit.framework.dll │ ├── pnunit-agent.exe │ ├── pnunit-agent.exe.config │ ├── pnunit-launcher.exe │ ├── pnunit-launcher.exe.config │ ├── pnunit.framework.dll │ ├── pnunit.tests.dll │ ├── runpnunit.bat │ ├── test.conf │ └── tests │ │ ├── mock-assembly.dll │ │ ├── nonamespace-assembly.dll │ │ ├── nunit-console.tests.dll │ │ ├── nunit-editor.tests.dll │ │ ├── nunit-gui.tests.dll │ │ ├── nunit.core.tests.dll │ │ ├── nunit.core.tests.net45.dll │ │ ├── nunit.framework.dll │ │ ├── nunit.framework.tests.dll │ │ ├── nunit.framework.tests.net45.dll │ │ ├── nunit.mocks.tests.dll │ │ ├── nunit.uiexception.tests.dll │ │ ├── nunit.uikit.tests.dll │ │ ├── nunit.util.tests.dll │ │ ├── test-assembly-net45.dll │ │ ├── test-assembly.dll │ │ └── test-utilities.dll └── license.txt ├── README.md ├── packages ├── NMock3.3.5.44 │ ├── NMock3.3.5.44.nupkg │ ├── content │ │ └── NMock3 │ │ │ ├── NMock3 Cheat Sheet.pdf │ │ │ └── NMockTest.cs │ └── lib │ │ ├── net35 │ │ ├── NMock3.dll │ │ └── NMock3.xml │ │ ├── net40 │ │ ├── NMock3.dll │ │ └── NMock3.xml │ │ └── sl40 │ │ ├── NMock3.dll │ │ └── NMock3.xml └── repositories.config └── scripts ├── EnumTemplate.cst ├── generateControllersFromTemplate.cmd ├── generateObjectsFromXsd.cmd ├── generateRequestFactorySpecified.cmd ├── generateTestControllersFromTemplate.cmd ├── generateTestForEnums.cmd ├── getXsdWsdl.cmd ├── masterUpdate.cmd ├── prepareBinariesForVeracodeScan.cmd └── validateCygwinBinaries.cmd /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "sample-code-csharp"] 2 | path = sample-code-csharp 3 | url = https://github.com/Authorizenet/sample-code-csharp.git 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: 2 | csharp 3 | 4 | dist: trusty 5 | 6 | install: 7 | - sudo apt-get install nunit-console 8 | 9 | before_script: 10 | - git submodule update --remote --recursive 11 | 12 | script: 13 | - xbuild ./Authorize.NET/AuthorizeNET.csproj 14 | - xbuild ./AuthorizeNETtest/AuthorizeNETtest.csproj 15 | # make mono happy by copying the config file with project name 16 | - cp AuthorizeNETtest/App.config AuthorizeNETtest/AuthorizeNETtest.config 17 | - nunit-console ./AuthorizeNETtest/AuthorizeNETtest.csproj -run=AuthorizeNet.Api.Controllers.MockTest -exclude Integration,NotWorkingOnMono 18 | 19 | - cp ./Authorize.NET/bin/Debug/AuthorizeNet.dll ./sample-code-csharp/ 20 | - xbuild ./sample-code-csharp/SampleCode.csproj 21 | - xbuild ./sample-code-csharp/SampleCodeTest/SampleCodeTest.csproj 22 | - nunit-console ./sample-code-csharp/SampleCodeTest/SampleCodeTest.csproj -run=SampleCodeTest 23 | -------------------------------------------------------------------------------- /Authorize.NET/Api/ControllerTemplate.cst: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class APICONTROLLERNAMEController : ApiOperationBase { 9 | 10 | public APICONTROLLERNAMEController(APICONTROLLERNAMERequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.APICONTROLLERNAMEType(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/ARBCancelSubscriptionController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class ARBCancelSubscriptionController : ApiOperationBase { 9 | 10 | public ARBCancelSubscriptionController(ARBCancelSubscriptionRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/ARBCreateSubscriptionController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class ARBCreateSubscriptionController : ApiOperationBase { 9 | 10 | public ARBCreateSubscriptionController(ARBCreateSubscriptionRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | if (null == request.subscription) throw new ArgumentException("subscription cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.ARBCreateSubscriptionRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/ARBGetSubscriptionController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class ARBGetSubscriptionController : ApiOperationBase { 9 | 10 | public ARBGetSubscriptionController(ARBGetSubscriptionRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | if ( request.subscriptionId == null) throw new ArgumentException( "Subscription ID cannot be null"); 18 | 19 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 20 | 21 | //validate not-required fields 22 | } 23 | 24 | protected override void BeforeExecute() 25 | { 26 | var request = GetApiRequest(); 27 | RequestFactoryWithSpecified.ARBGetSubscriptionRequest(request); 28 | } 29 | } 30 | #pragma warning restore 1591 31 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/ARBGetSubscriptionListController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class ARBGetSubscriptionListController : ApiOperationBase { 9 | 10 | public ARBGetSubscriptionListController(ARBGetSubscriptionListRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | } 16 | } 17 | #pragma warning restore 1591 18 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/ARBGetSubscriptionStatusController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class ARBGetSubscriptionStatusController : ApiOperationBase { 9 | 10 | public ARBGetSubscriptionStatusController(ARBGetSubscriptionStatusRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/ARBUpdateSubscriptionController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class ARBUpdateSubscriptionController : ApiOperationBase { 9 | 10 | public ARBUpdateSubscriptionController(ARBUpdateSubscriptionRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.ARBUpdateSubscriptionRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/Bases/ErrorResponse.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.Bases 2 | { 3 | using System.Text; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | 6 | //@XmlRootElement(name = "ErrorResponse") 7 | /** 8 | * Since JAXB does not generate the class for this element, custom coding it 9 | * @author ramittal 10 | * 11 | */ 12 | abstract class ErrorResponse : ANetApiResponse { 13 | 14 | public new string ToString() { 15 | var builder = new StringBuilder(); 16 | builder.Append("ErrorResponse: "); 17 | builder.Append(base.ToString()); 18 | builder.Append(", Id: ").Append( refId); 19 | builder.Append(", SessionToken: ").Append(sessionToken); 20 | var messagesType = messages; 21 | builder.Append(", MessagesType: "); 22 | if ( null != messagesType) 23 | { 24 | builder.Append(", ResultCode:").Append(messagesType.resultCode); 25 | var resultMessages = messagesType.message; 26 | if ( null != resultMessages) { 27 | foreach (var message in resultMessages) 28 | { 29 | builder.Append(", Message-> "); 30 | builder.Append(", Code: ").Append(message.code); 31 | builder.Append(", Text: ").Append(message.text); 32 | } 33 | } 34 | } 35 | 36 | return builder.ToString(); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/Bases/IApiOperation.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.Bases 2 | { 3 | using System.Collections.Generic; 4 | 5 | /** 6 | * @author ramittal 7 | * 8 | */ 9 | #pragma warning disable 1591 10 | public interface IApiOperation 11 | where TQ : AuthorizeNet.Api.Contracts.V1.ANetApiRequest 12 | where TS : AuthorizeNet.Api.Contracts.V1.ANetApiResponse 13 | { 14 | TS GetApiResponse(); 15 | AuthorizeNet.Api.Contracts.V1.ANetApiResponse GetErrorResponse(); 16 | TS ExecuteWithApiResponse(AuthorizeNet.Environment environment = null); 17 | void Execute(AuthorizeNet.Environment environment = null); 18 | AuthorizeNet.Api.Contracts.V1.messageTypeEnum GetResultCode(); 19 | List GetResults(); 20 | } 21 | #pragma warning restore 1591 22 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/authenticateTestController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class authenticateTestController : ApiOperationBase { 9 | 10 | public authenticateTestController(authenticateTestRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.authenticateTestRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/createCustomerPaymentProfileController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class createCustomerPaymentProfileController : ApiOperationBase { 9 | 10 | public createCustomerPaymentProfileController(createCustomerPaymentProfileRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.createCustomerPaymentProfileRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/createCustomerProfileController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class createCustomerProfileController : ApiOperationBase { 9 | 10 | public createCustomerProfileController(createCustomerProfileRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.createCustomerProfileRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/createCustomerProfileFromTransactionController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class createCustomerProfileFromTransactionController : ApiOperationBase 9 | { 10 | 11 | public createCustomerProfileFromTransactionController(createCustomerProfileFromTransactionRequest apiRequest) 12 | : base(apiRequest) 13 | { 14 | } 15 | 16 | override protected void ValidateRequest() { 17 | var request = GetApiRequest(); 18 | 19 | //validate required fields 20 | if (null == request.transId) throw new ArgumentException("transactionId cannot be null"); 21 | 22 | //validate not-required fields 23 | } 24 | } 25 | #pragma warning restore 1591 26 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/createCustomerProfileTransactionController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class createCustomerProfileTransactionController : ApiOperationBase { 9 | 10 | public createCustomerProfileTransactionController(createCustomerProfileTransactionRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | if (null == request.transaction) throw new ArgumentException("transaction cannot be null"); 18 | 19 | //validate not-required fields 20 | } 21 | } 22 | #pragma warning restore 1591 23 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/createCustomerShippingAddressController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class createCustomerShippingAddressController : ApiOperationBase { 9 | 10 | public createCustomerShippingAddressController(createCustomerShippingAddressRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/createFingerPrintController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class createFingerPrintController : ApiOperationBase { 9 | 10 | public createFingerPrintController(createFingerPrintRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | if (null == request.supportInformation) throw new ArgumentException("supportInformation cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.createFingerPrintRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/createProfileController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class createProfileController 9 | //: ApiOperationBase 10 | { 11 | 12 | public createProfileController(customerProfilePaymentType apiRequest)// : base(apiRequest) 13 | { 14 | } 15 | 16 | //override 17 | protected void ValidateRequest() { 18 | //var request = GetApiRequest(); 19 | 20 | //validate required fields 21 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 22 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 23 | 24 | //validate not-required fields 25 | } 26 | 27 | //protected override void BeforeExecute() 28 | protected void BeforeExecute() 29 | { 30 | //var request = GetApiRequest(); 31 | //RequestFactoryWithSpecified.createProfileType(request); 32 | } 33 | } 34 | #pragma warning restore 1591 35 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/createTransactionController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class createTransactionController : ApiOperationBase { 9 | 10 | public createTransactionController(createTransactionRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.createTransactionRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/decryptPaymentDataController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class decryptPaymentDataController : ApiOperationBase { 9 | 10 | public decryptPaymentDataController(decryptPaymentDataRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.decryptPaymentDataRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/deleteCustomerPaymentProfileController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class deleteCustomerPaymentProfileController : ApiOperationBase { 9 | 10 | public deleteCustomerPaymentProfileController(deleteCustomerPaymentProfileRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/deleteCustomerProfileController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class deleteCustomerProfileController : ApiOperationBase { 9 | 10 | public deleteCustomerProfileController(deleteCustomerProfileRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/deleteCustomerShippingAddressController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class deleteCustomerShippingAddressController : ApiOperationBase { 9 | 10 | public deleteCustomerShippingAddressController(deleteCustomerShippingAddressRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getAUJobDetailsController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getAUJobDetailsController : ApiOperationBase { 9 | 10 | public getAUJobDetailsController(getAUJobDetailsRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | } 27 | } 28 | #pragma warning restore 1591 29 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getAUJobSummaryController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getAUJobSummaryController : ApiOperationBase { 9 | 10 | public getAUJobSummaryController(getAUJobSummaryRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | } 27 | } 28 | #pragma warning restore 1591 29 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getBatchStatisticsController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getBatchStatisticsController : ApiOperationBase { 9 | 10 | public getBatchStatisticsController(getBatchStatisticsRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getCustomerPaymentProfileController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getCustomerPaymentProfileController : ApiOperationBase { 9 | 10 | public getCustomerPaymentProfileController(getCustomerPaymentProfileRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getCustomerPaymentProfileListController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getCustomerPaymentProfileListController : ApiOperationBase { 9 | 10 | public getCustomerPaymentProfileListController(getCustomerPaymentProfileListRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | if (request.searchType < 0) throw new ArgumentException("SearchType cannot be null"); 18 | if (request.month == null) throw new ArgumentException("month cannot be null"); 19 | 20 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 21 | 22 | //validate not-required fields 23 | } 24 | 25 | protected override void BeforeExecute() 26 | { 27 | var request = GetApiRequest(); 28 | RequestFactoryWithSpecified.getCustomerPaymentProfileListRequest(request); 29 | } 30 | } 31 | #pragma warning restore 1591 32 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getCustomerPaymentProfileNonceController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getCustomerPaymentProfileNonceController : ApiOperationBase { 9 | 10 | public getCustomerPaymentProfileNonceController(getCustomerPaymentProfileNonceRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | // RequestFactoryWithSpecified.getCustomerPaymentProfileNonceType(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getCustomerProfileController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getCustomerProfileController : ApiOperationBase { 9 | 10 | public getCustomerProfileController(getCustomerProfileRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getCustomerProfileIdsController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getCustomerProfileIdsController : ApiOperationBase { 9 | 10 | public getCustomerProfileIdsController(getCustomerProfileIdsRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getCustomerShippingAddressController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getCustomerShippingAddressController : ApiOperationBase { 9 | 10 | public getCustomerShippingAddressController(getCustomerShippingAddressRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getHostedPaymentPageController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getHostedPaymentPageController : ApiOperationBase { 9 | 10 | public getHostedPaymentPageController(getHostedPaymentPageRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.getHostedPaymentPageRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getHostedProfilePageController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getHostedProfilePageController : ApiOperationBase { 9 | 10 | public getHostedProfilePageController(getHostedProfilePageRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getMerchantDetailsController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getMerchantDetailsController : ApiOperationBase { 9 | 10 | public getMerchantDetailsController(getMerchantDetailsRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.getMerchantDetailsRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getSettledBatchListController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getSettledBatchListController : ApiOperationBase { 9 | 10 | public getSettledBatchListController(getSettledBatchListRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.getSettledBatchListRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getTransactionDetailsController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getTransactionDetailsController : ApiOperationBase { 9 | 10 | public getTransactionDetailsController(getTransactionDetailsRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getTransactionListController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getTransactionListController : ApiOperationBase { 9 | 10 | public getTransactionListController(getTransactionListRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getTransactionListForCustomerController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getTransactionListForCustomerController : ApiOperationBase { 9 | 10 | public getTransactionListForCustomerController(getTransactionListForCustomerRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.getTransactionListForCustomerRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/getUnsettledTransactionListController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class getUnsettledTransactionListController : ApiOperationBase { 9 | 10 | public getUnsettledTransactionListController(getUnsettledTransactionListRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/isAliveController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class isAliveController : ApiOperationBase 9 | { 10 | 11 | public isAliveController(ANetApiRequest apiRequest) 12 | : base(apiRequest) 13 | { 14 | } 15 | 16 | override protected void ValidateRequest() { 17 | var request = GetApiRequest(); 18 | 19 | } 20 | 21 | protected override void BeforeExecute() 22 | { 23 | var request = GetApiRequest(); 24 | RequestFactoryWithSpecified.isAliveRequest(request); 25 | } 26 | } 27 | #pragma warning restore 1591 28 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/logoutController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class logoutController : ApiOperationBase { 9 | 10 | public logoutController(logoutRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.logoutRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/mobileDeviceLoginController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class mobileDeviceLoginController : ApiOperationBase { 9 | 10 | public mobileDeviceLoginController(mobileDeviceLoginRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/mobileDeviceRegistrationController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class mobileDeviceRegistrationController : ApiOperationBase { 9 | 10 | public mobileDeviceRegistrationController(mobileDeviceRegistrationRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.mobileDeviceRegistrationRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/securePaymentContainerController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class securePaymentContainerController : ApiOperationBase { 9 | 10 | public securePaymentContainerController(securePaymentContainerRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.securePaymentContainerRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/sendCustomerTransactionReceiptController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class sendCustomerTransactionReceiptController : ApiOperationBase { 9 | 10 | public sendCustomerTransactionReceiptController(sendCustomerTransactionReceiptRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/transactionController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class transactionController 9 | //: ApiOperationBase 10 | { 11 | 12 | public transactionController(transactionRequestType apiRequest) 13 | //: base(apiRequest) 14 | { 15 | } 16 | 17 | //override 18 | protected void ValidateRequest() { 19 | //var request = GetApiRequest(); 20 | 21 | //validate required fields 22 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 23 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 24 | 25 | //validate not-required fields 26 | } 27 | 28 | //protected override void BeforeExecute() 29 | protected void BeforeExecute() 30 | { 31 | //var request = GetApiRequest(); 32 | //RequestFactoryWithSpecified.transactionRequestType(request); 33 | } 34 | } 35 | #pragma warning restore 1591 36 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/transactionResponseEmvController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class transactionResponseEmvController : ApiOperationBase { 9 | 10 | public transactionResponseEmvController(transactionResponseEmvRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.transactionResponseEmvType(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/updateCustomerPaymentProfileController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class updateCustomerPaymentProfileController : ApiOperationBase { 9 | 10 | public updateCustomerPaymentProfileController(updateCustomerPaymentProfileRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.updateCustomerPaymentProfileRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/updateCustomerProfileController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class updateCustomerProfileController : ApiOperationBase { 9 | 10 | public updateCustomerProfileController(updateCustomerProfileRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.updateCustomerProfileRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/updateCustomerShippingAddressController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class updateCustomerShippingAddressController : ApiOperationBase { 9 | 10 | public updateCustomerShippingAddressController(updateCustomerShippingAddressRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/updateHeldTransactionController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class updateHeldTransactionController : ApiOperationBase { 9 | 10 | public updateHeldTransactionController(updateHeldTransactionRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.updateHeldTransactionRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/updateMerchantDetailsController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class updateMerchantDetailsController : ApiOperationBase { 9 | 10 | public updateMerchantDetailsController(updateMerchantDetailsRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | 23 | protected override void BeforeExecute() 24 | { 25 | var request = GetApiRequest(); 26 | RequestFactoryWithSpecified.updateMerchantDetailsRequest(request); 27 | } 28 | } 29 | #pragma warning restore 1591 30 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/updateSplitTenderGroupController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class updateSplitTenderGroupController : ApiOperationBase { 9 | 10 | public updateSplitTenderGroupController(updateSplitTenderGroupRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/Api/Controllers/validateCustomerPaymentProfileController.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers 2 | { 3 | using System; 4 | using AuthorizeNet.Api.Contracts.V1; 5 | using AuthorizeNet.Api.Controllers.Bases; 6 | 7 | #pragma warning disable 1591 8 | public class validateCustomerPaymentProfileController : ApiOperationBase { 9 | 10 | public validateCustomerPaymentProfileController(validateCustomerPaymentProfileRequest apiRequest) : base(apiRequest) { 11 | } 12 | 13 | override protected void ValidateRequest() { 14 | var request = GetApiRequest(); 15 | 16 | //validate required fields 17 | //if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null"); 18 | //if ( null == request.Paging) throw new ArgumentException("Paging cannot be null"); 19 | 20 | //validate not-required fields 21 | } 22 | } 23 | #pragma warning restore 1591 24 | } -------------------------------------------------------------------------------- /Authorize.NET/MarketType.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet 2 | { 3 | #pragma warning disable 1591 4 | 5 | // MarketType is used for Card Present transactions. 6 | public enum MarketType { 7 | RETAIL = 2, 8 | 9 | } 10 | #pragma warning disable 1591 11 | } -------------------------------------------------------------------------------- /Authorize.NET/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Official .NET SDK for Authorize.Net")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Visa Inc")] 12 | [assembly: AssemblyProduct("Official .NET SDK for Authorize.Net")] 13 | [assembly: AssemblyCopyright("Copyright © Visa Inc 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("135241b2-017e-4f07-aca1-e71887b470ab")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // See AssemblyFileVersion.cs for Product and Assembly Version 33 | //[assembly: AssemblyVersion("2.0.2.0")] 34 | [assembly: AssemblyFileVersion("2.0.4.0")] 35 | [assembly: AssemblyVersion("2.0.4.0")] 36 | 37 | -------------------------------------------------------------------------------- /Authorize.NET/TestFriends.cs: -------------------------------------------------------------------------------- 1 | [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("AuthorizeNETtest")] -------------------------------------------------------------------------------- /Authorize.NET/Util/Constants.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Util 2 | { 3 | #pragma warning disable 1591 4 | public static class Constants { 5 | public const string ProxyProtocol = "http"; 6 | 7 | public const string HttpsUseProxy = "https.proxyUse"; 8 | public const string HttpsProxyHost = "https.proxyHost"; 9 | public const string HttpsProxyPort = "https.proxyPort"; 10 | 11 | public const string HttpUseProxy = "http.proxyUse"; 12 | public const string HttpProxyHost = "http.proxyHost"; 13 | public const string HttpProxyPort = "http.proxyPort"; 14 | 15 | public const string EnvApiLoginid = "API_LOGIN_ID"; 16 | public const string EnvTransactionKey = "TRANSACTION_KEY"; 17 | public const string EnvMd5Hashkey = "MD5_HASH_KEY"; 18 | 19 | public const string PropApiLoginid = "api.login.id"; 20 | public const string PropTransactionKey = "transaction.key"; 21 | public const string PropMd5Hashkey = "md5.hash.key"; 22 | 23 | public const string HttpConnectionTimeout = "http.connectionTimeout"; 24 | public const string HttpReadWriteTimeout = "http.readWriteTimeout"; 25 | 26 | public const int HttpConnectionDefaultTimeout = 30000; 27 | public const int HttpReadWriteDefaultTimeout = 30000; 28 | 29 | public const string SDKVersion = "2.0.3"; 30 | 31 | } 32 | #pragma warning restore 1591 33 | } 34 | -------------------------------------------------------------------------------- /Authorize.NET/Util/EnumHelper.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Util 2 | { 3 | using System; 4 | using System.ComponentModel; 5 | 6 | #pragma warning disable 1591 7 | //@deprecated since version 1.9.8 8 | //@deprecated Since it is not using by New model Code 9 | [Obsolete("Since the classes using it are deprecated", false)] 10 | public class EnumHelper 11 | { 12 | 13 | public static string GetEnumDescription(Enum value) 14 | { 15 | string description = value.ToString(); 16 | 17 | var fi = value.GetType().GetField(value.ToString()); 18 | 19 | var attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false); 20 | // ReSharper disable ConditionIsAlwaysTrueOrFalse 21 | if (null != attributes && attributes.Length > 0) 22 | // ReSharper restore ConditionIsAlwaysTrueOrFalse 23 | { 24 | description = attributes[0].Description; 25 | } 26 | 27 | return description; 28 | } 29 | } 30 | #pragma warning restore 1591 31 | } 32 | -------------------------------------------------------------------------------- /Authorize.NET/Util/HtmlHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | 4 | namespace AuthorizeNet.Util 5 | { 6 | //@deprecated since version 1.9.8 7 | //@deprecated Since it is not using by New model Code 8 | [Obsolete("Since the classes using it are deprecated", false)] 9 | class HtmlHelper 10 | { 11 | /// 12 | /// This will issue a full HTML document with a built-in script, which will redirect the browser away from 13 | /// Authorize.NET to the URL you pass in. Be sure the toURL is absolute. This can be used in your DPM Replay Response Endpoint 14 | /// 15 | /// 16 | /// 17 | public static string RelayResponseRedirecter(string toUrl) { 18 | 19 | return string.Format("", toUrl); 20 | 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Authorize.NET/Util/SensitiveDataConfigType.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Util 2 | { 3 | public class SensitiveTag 4 | { 5 | public string tagName { get; set; } 6 | public string pattern { get; set; } 7 | public string replacement { get; set; } 8 | public bool disableMask { get; set; } 9 | 10 | public SensitiveTag(string tagName, string pattern, string replacement, bool disableMask) 11 | { 12 | this.tagName = tagName; 13 | this.pattern = pattern; 14 | this.replacement = replacement; 15 | this.disableMask = disableMask; 16 | } 17 | } 18 | 19 | public static class SensitiveDataConfigType 20 | { 21 | public static SensitiveTag[] sensitiveTags = new SensitiveTag[] 22 | { 23 | new SensitiveTag("cardCode", "", "XXX", false), 24 | new SensitiveTag("cardNumber", "(\\p{N}+)(\\p{N}{4})", "XXXX-$2", false), 25 | new SensitiveTag("expirationDate", "", "XXX", false), 26 | new SensitiveTag("accountNumber", "(\\p{N}+)(\\p{N}{4})", "XXXX-$2", false), 27 | new SensitiveTag("nameOnAccount", "", "XXX", false), 28 | new SensitiveTag("transactionKey", "", "XXX", false) 29 | }; 30 | 31 | public static string[] sensitiveStringRegexes = new string[] { 32 | "4\\p{N}{3}([\\ \\-]?)\\p{N}{4}\\1\\p{N}{4}\\1\\p{N}{4}", 33 | "4\\p{N}{3}([\\ \\-]?)(?:\\p{N}{4}\\1){2}\\p{N}(?:\\p{N}{3})?", 34 | "5[1-5]\\p{N}{2}([\\ \\-]?)\\p{N}{4}\\1\\p{N}{4}\\1\\p{N}{4}", 35 | "6(?:011|22(?:1(?=[\\ \\-]?(?:2[6-9]|[3-9]))|[2-8]|9(?=[\\ \\-]?(?:[01]|2[0-5])))|4[4-9]\\p{N}|5\\p{N}\\p{N})([\\ \\-]?)\\p{N}{4}\\1\\p{N}{4}\\1\\p{N}{4}", 36 | "35(?:2[89]|[3-8]\\p{N})([\\ \\-]?)\\p{N}{4}\\1\\p{N}{4}\\1\\p{N}{4}", 37 | "3[47]\\p{N}\\p{N}([\\ \\-]?)\\p{N}{6}\\1\\p{N}{5}"}; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Authorize.NET/Util/SensitiveDataConsoleLogger.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Util 2 | { 3 | using System; 4 | 5 | public class SensitiveDataConsoleLogger : SensitiveDataTextLogger 6 | { 7 | public SensitiveDataConsoleLogger() : base (Console.Out) { 8 | } 9 | 10 | public SensitiveDataConsoleLogger(bool useErrorStream) : base (useErrorStream ? Console.Error : Console.Out) { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Authorize.NET/Util/StringUtils.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Util 2 | { 3 | /// 4 | /// 5 | /// 6 | public class StringUtils { 7 | 8 | /* 9 | private static Log _logger = LogFactory.getLog(typeof( StringUtils)); 10 | */ 11 | 12 | /// 13 | /// 14 | /// 15 | /// 16 | /// 17 | public static double ParseDouble(string doublestringValue) { 18 | double amount = 0.0; 19 | 20 | if ( null != doublestringValue && 0 < doublestringValue.Trim().Length) 21 | { 22 | double.TryParse(doublestringValue.Trim(), out amount ); 23 | } 24 | 25 | return amount; 26 | } 27 | 28 | /// 29 | /// 30 | /// 31 | /// 32 | /// 33 | public static int ParseInt(string intstringValue) { 34 | int amount = 0; 35 | 36 | if ( null != intstringValue && 0 < intstringValue.Trim().Length) 37 | { 38 | int.TryParse(intstringValue.Trim(), out amount); 39 | } 40 | 41 | return amount; 42 | } 43 | 44 | /// 45 | /// 46 | /// 47 | /// 48 | /// 49 | public static bool ParseBool(string boolstringValue) { 50 | bool result = false; 51 | 52 | if ( null != boolstringValue && 0 < boolstringValue.Trim().Length) 53 | { 54 | bool.TryParse(boolstringValue.Trim(), out result); 55 | } 56 | 57 | return result; 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /Authorize.NET/Util/XmlUtility.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Util 2 | { 3 | using System; 4 | using System.IO; 5 | using System.Xml.Serialization; 6 | 7 | #pragma warning disable 1591 8 | public static class XmlUtility { 9 | 10 | private static readonly Log Logger = LogFactory.getLog(typeof(XmlUtility)); 11 | 12 | public static string GetXml(T entity) //where T: object //MarshalByRefObject //Serializable 13 | { 14 | string xmlString; 15 | 16 | var requestType = typeof (T); 17 | try 18 | { 19 | var serializer = new XmlSerializer(requestType); 20 | using (var writer = new Utf8StringWriter()) 21 | { 22 | 23 | serializer.Serialize(writer, entity); 24 | xmlString = writer.ToString(); 25 | } 26 | } 27 | catch (Exception e) 28 | { 29 | LogHelper.error(Logger, "Error:'{0}' when serializing object:'{1}' to xml", e.Message, requestType); 30 | throw; 31 | } 32 | 33 | return xmlString; 34 | } 35 | 36 | public static T Create(string xml) //where T: object //MarshalByRefObject 37 | { 38 | var entity = default(T); 39 | //make sure we have not null and not-empty string to de-serialize 40 | if ( null != xml && 0 != xml.Trim().Length) 41 | { 42 | var responseType = typeof (T); 43 | try 44 | { 45 | object deSerializedobject; 46 | var serializer = new XmlSerializer(responseType); 47 | using (var reader = new StringReader(xml)) 48 | { 49 | deSerializedobject = serializer.Deserialize(reader); 50 | } 51 | 52 | if (deSerializedobject is T) 53 | { 54 | entity = (T) deSerializedobject; 55 | } 56 | } 57 | catch (Exception e) 58 | { 59 | LogHelper.error(Logger, "Error:'{0}' when deserializing the into object:'{1}' from xml:'{2}'", e.Message, responseType, xml); 60 | throw; 61 | } 62 | } 63 | 64 | return entity; 65 | } 66 | } 67 | 68 | public sealed class Utf8StringWriter : StringWriter 69 | { 70 | public override System.Text.Encoding Encoding { get { return System.Text.Encoding.UTF8; } } 71 | } 72 | #pragma warning disable 1591 73 | } -------------------------------------------------------------------------------- /Authorize.NET/Utility/AnetRandom.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Security.Cryptography; 3 | 4 | namespace AuthorizeNet.Utility 5 | { 6 | public class AnetRandom 7 | { 8 | private const int BufferSize = 1024; // must be a multiple of 4 9 | private readonly byte[] randomBuffer; 10 | private int bufferOffset; 11 | private readonly RNGCryptoServiceProvider rngCryptoServiceProvider; 12 | private readonly int seed; 13 | 14 | public AnetRandom() : this(0) 15 | { 16 | } 17 | 18 | public AnetRandom(int seed) 19 | { 20 | this.seed = seed; 21 | randomBuffer = new byte[BufferSize]; 22 | rngCryptoServiceProvider = new RNGCryptoServiceProvider(); 23 | bufferOffset = randomBuffer.Length; 24 | } 25 | 26 | private void FillBuffer() 27 | { 28 | rngCryptoServiceProvider.GetBytes(randomBuffer); 29 | bufferOffset = 0; 30 | } 31 | 32 | private int Next() 33 | { 34 | if (bufferOffset >= randomBuffer.Length) 35 | { 36 | FillBuffer(); 37 | } 38 | 39 | // BitConverter.ToInt32 gets the next four bytes in the array and returns a 32 bit integer. 40 | int val = BitConverter.ToInt32(randomBuffer, bufferOffset) & 0x7fffffff; 41 | 42 | //this makes sure number is positive. 43 | bufferOffset += sizeof(int); 44 | return val; 45 | } 46 | 47 | // if seed is greater than or equal to max value, next() % maxValue is always less than seed. 48 | // if seed is less than max value, (maxValue - seed) ensures that this method result is always less than seed. 49 | public int Next(int maxValue) 50 | { 51 | return seed >= maxValue ? Next() % maxValue : Next() % (maxValue - seed) + seed; 52 | } 53 | 54 | public int Next(int minValue, int maxValue) 55 | { 56 | if (maxValue < minValue) 57 | { 58 | throw new ArgumentOutOfRangeException("maxValue must be greater than or equal to minValue"); 59 | } 60 | 61 | var range = maxValue - minValue; 62 | return minValue + Next(range); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Authorize.NET/Utility/CryptoRandom.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Security.Cryptography; 6 | 7 | namespace AuthorizeNet 8 | { 9 | /// 10 | /// Source Code from MSDN article http://msdn.microsoft.com/en-us/magazine/cc163367.aspx 11 | /// 12 | public class CryptoRandom 13 | { 14 | private RNGCryptoServiceProvider _rng = 15 | new RNGCryptoServiceProvider(); 16 | private byte[] _uint32Buffer = new byte[4]; 17 | 18 | public CryptoRandom() { } 19 | public CryptoRandom(Int32 ignoredSeed) { } 20 | 21 | public Int32 Next() 22 | { 23 | _rng.GetBytes(_uint32Buffer); 24 | return BitConverter.ToInt32(_uint32Buffer, 0) & 0x7FFFFFFF; 25 | } 26 | 27 | public Int32 Next(Int32 maxValue) 28 | { 29 | if (maxValue < 0) 30 | throw new ArgumentOutOfRangeException("maxValue"); 31 | return Next(0, maxValue); 32 | } 33 | 34 | public Int32 Next(Int32 minValue, Int32 maxValue) 35 | { 36 | if (minValue > maxValue) 37 | throw new ArgumentOutOfRangeException("minValue"); 38 | if (minValue == maxValue) return minValue; 39 | Int64 diff = maxValue - minValue; 40 | while (true) 41 | { 42 | _rng.GetBytes(_uint32Buffer); 43 | UInt32 rand = BitConverter.ToUInt32(_uint32Buffer, 0); 44 | 45 | Int64 max = (1 + (Int64)UInt32.MaxValue); 46 | Int64 remainder = max % diff; 47 | if (rand < max - remainder) 48 | { 49 | return (Int32)(minValue + (rand % diff)); 50 | } 51 | } 52 | } 53 | 54 | public double NextDouble() 55 | { 56 | _rng.GetBytes(_uint32Buffer); 57 | UInt32 rand = BitConverter.ToUInt32(_uint32Buffer, 0); 58 | return rand / (1.0 + UInt32.MaxValue); 59 | } 60 | 61 | public void NextBytes(byte[] buffer) 62 | { 63 | if (buffer == null) throw new ArgumentNullException("buffer"); 64 | _rng.GetBytes(buffer); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /AuthorizeNET.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.10.35027.167 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthorizeNET", "Authorize.NET\AuthorizeNET.csproj", "{5D52EAEC-42FB-4313-83B8-69E2F55EBF14}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthorizeNETtest", "AuthorizeNETtest\AuthorizeNETtest.csproj", "{CDA0D4D8-E4AA-4BEA-8839-04D69607D914}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | USELOCAL|Any CPU = USELOCAL|Any CPU 15 | EndGlobalSection 16 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 17 | {5D52EAEC-42FB-4313-83B8-69E2F55EBF14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 18 | {5D52EAEC-42FB-4313-83B8-69E2F55EBF14}.Debug|Any CPU.Build.0 = Debug|Any CPU 19 | {5D52EAEC-42FB-4313-83B8-69E2F55EBF14}.Release|Any CPU.ActiveCfg = Release|Any CPU 20 | {5D52EAEC-42FB-4313-83B8-69E2F55EBF14}.Release|Any CPU.Build.0 = Release|Any CPU 21 | {5D52EAEC-42FB-4313-83B8-69E2F55EBF14}.USELOCAL|Any CPU.ActiveCfg = Release|Any CPU 22 | {5D52EAEC-42FB-4313-83B8-69E2F55EBF14}.USELOCAL|Any CPU.Build.0 = Release|Any CPU 23 | {CDA0D4D8-E4AA-4BEA-8839-04D69607D914}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 24 | {CDA0D4D8-E4AA-4BEA-8839-04D69607D914}.Debug|Any CPU.Build.0 = Debug|Any CPU 25 | {CDA0D4D8-E4AA-4BEA-8839-04D69607D914}.Release|Any CPU.ActiveCfg = Release|Any CPU 26 | {CDA0D4D8-E4AA-4BEA-8839-04D69607D914}.Release|Any CPU.Build.0 = Release|Any CPU 27 | {CDA0D4D8-E4AA-4BEA-8839-04D69607D914}.USELOCAL|Any CPU.ActiveCfg = Release|Any CPU 28 | {CDA0D4D8-E4AA-4BEA-8839-04D69607D914}.USELOCAL|Any CPU.Build.0 = Release|Any CPU 29 | EndGlobalSection 30 | GlobalSection(SolutionProperties) = preSolution 31 | HideSolutionNode = FALSE 32 | EndGlobalSection 33 | GlobalSection(TestCaseManagementSettings) = postSolution 34 | CategoryFile = AuthorizeNET.vsmdi 35 | EndGlobalSection 36 | EndGlobal 37 | -------------------------------------------------------------------------------- /AuthorizeNET.vsmdi: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/ControllerTemplateTest.cst: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class APICONTROLLERNAMETest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockAPICONTROLLERNAMETest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new APICONTROLLERNAMERequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new APICONTROLLERNAMEResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | Yyyyy = Yyyy, 53 | }; 54 | 55 | var errorResponse = new ANetApiResponse(); 56 | var results = new List(); 57 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 58 | 59 | SetMockControllerExpectations( 60 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 61 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 62 | //mockController.MockObject.Execute(); 63 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 64 | var controllerResponse = mockController.MockObject.GetApiResponse(); 65 | Assert.IsNotNull(controllerResponse); 66 | 67 | Assert.IsNotNull(controllerResponse.Yyyyy); 68 | LogHelper.info(Logger, "APICONTROLLERNAME: Details:{0}", controllerResponse.Yyyyy); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/ARBCancelSubscriptionControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class ARBCancelSubscriptionTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockARBCancelSubscriptionTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new ARBCancelSubscriptionRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new ARBCancelSubscriptionResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | }; 53 | 54 | var errorResponse = new ANetApiResponse(); 55 | var results = new List(); 56 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 57 | 58 | SetMockControllerExpectations( 59 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 60 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 61 | //mockController.MockObject.Execute(); 62 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 63 | var controllerResponse = mockController.MockObject.GetApiResponse(); 64 | Assert.IsNotNull(controllerResponse); 65 | 66 | LogHelper.info(Logger, "ARBCancelSubscription: "); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/ARBCreateSubscriptionControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class ARBCreateSubscriptionTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockARBCreateSubscriptionTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new ARBCreateSubscriptionRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | subscription = ArbSubscriptionOne, 48 | }; 49 | var mockResponse = new ARBCreateSubscriptionResponse 50 | { 51 | refId = "1234", 52 | sessionToken = "sessiontoken", 53 | subscriptionId = "1234", 54 | }; 55 | 56 | var errorResponse = new ANetApiResponse(); 57 | var results = new List(); 58 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 59 | 60 | SetMockControllerExpectations( 61 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 62 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 63 | //mockController.MockObject.Execute(); 64 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 65 | var controllerResponse = mockController.MockObject.GetApiResponse(); 66 | Assert.IsNotNull(controllerResponse); 67 | 68 | Assert.IsNotNull(controllerResponse.subscriptionId); 69 | LogHelper.info(Logger, "ARBCreateSubscription: Details:{0}", controllerResponse.subscriptionId); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/ARBGetSubscriptionStatusControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class ARBGetSubscriptionStatusTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockARBGetSubscriptionStatusTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new ARBGetSubscriptionStatusRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new ARBGetSubscriptionStatusResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | status = ARBSubscriptionStatusEnum.active, 53 | }; 54 | 55 | var errorResponse = new ANetApiResponse(); 56 | var results = new List(); 57 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 58 | 59 | SetMockControllerExpectations( 60 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 61 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 62 | //mockController.MockObject.Execute(); 63 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 64 | var controllerResponse = mockController.MockObject.GetApiResponse(); 65 | Assert.IsNotNull(controllerResponse); 66 | 67 | Assert.IsNotNull(controllerResponse.status); 68 | LogHelper.info(Logger, "ARBGetSubscriptionStatus: Details:{0}", controllerResponse.status); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/ARBUpdateSubscriptionControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class ARBUpdateSubscriptionTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockARBUpdateSubscriptionTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new ARBUpdateSubscriptionRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new ARBUpdateSubscriptionResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | }; 53 | 54 | var errorResponse = new ANetApiResponse(); 55 | var results = new List(); 56 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 57 | 58 | SetMockControllerExpectations( 59 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 60 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 61 | //mockController.MockObject.Execute(); 62 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 63 | var controllerResponse = mockController.MockObject.GetApiResponse(); 64 | Assert.IsNotNull(controllerResponse); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/authenticateTestControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class authenticateTestTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockauthenticateTestTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new authenticateTestRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new authenticateTestResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | }; 53 | 54 | var errorResponse = new ANetApiResponse(); 55 | var results = new List(); 56 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 57 | 58 | SetMockControllerExpectations( 59 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 60 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 61 | //mockController.MockObject.Execute(); 62 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 63 | var controllerResponse = mockController.MockObject.GetApiResponse(); 64 | Assert.IsNotNull(controllerResponse); 65 | 66 | // Assert.IsNotNull(controllerResponse.); 67 | LogHelper.info(Logger, "authenticateTest: Details:{0}", controllerResponse); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/createCustomerShippingAddressControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class createCustomerShippingAddressTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockcreateCustomerShippingAddressTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new createCustomerShippingAddressRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new createCustomerShippingAddressResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | customerAddressId = "1234", 53 | }; 54 | 55 | var errorResponse = new ANetApiResponse(); 56 | var results = new List(); 57 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 58 | 59 | SetMockControllerExpectations( 60 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 61 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 62 | //mockController.MockObject.Execute(); 63 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 64 | var controllerResponse = mockController.MockObject.GetApiResponse(); 65 | Assert.IsNotNull(controllerResponse); 66 | 67 | Assert.IsNotNull(controllerResponse.customerAddressId); 68 | LogHelper.info(Logger, "createCustomerShippingAddress: Details:{0}", controllerResponse.customerAddressId); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/createProfileControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | //using System; 4 | //using System.Collections.Generic; 5 | //using AuthorizeNet.Api.Contracts.V1; 6 | //using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | //using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class createProfileTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockcreateProfileTest() 41 | { 42 | //createProfileRequest does not exist 43 | /* 44 | //define all mocked objects as final 45 | var mockController = GetMockController(); 46 | var mockRequest = new createProfileRequest 47 | { 48 | merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 49 | }; 50 | var mockResponse = new createProfileResponse 51 | { 52 | refId = "1234", 53 | sessionToken = "sessiontoken", 54 | Yyyyy = Yyyy, 55 | }; 56 | 57 | var errorResponse = new ANetApiResponse(); 58 | var results = new List(); 59 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 60 | 61 | SetMockControllerExpectations( 62 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 63 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 64 | //mockController.MockObject.Execute(); 65 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 66 | var controllerResponse = mockController.MockObject.GetApiResponse(); 67 | Assert.IsNotNull(controllerResponse); 68 | 69 | Assert.IsNotNull(controllerResponse.Yyyyy); 70 | LogHelper.info(Logger, "createProfile: Details:{0}", controllerResponse.Yyyyy); 71 | */ 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/decryptPaymentDataControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class decryptPaymentDataTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockdecryptPaymentDataTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new decryptPaymentDataRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new decryptPaymentDataResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | paymentDetails = new paymentDetails() { amount = "15.50" } 53 | }; 54 | 55 | var errorResponse = new ANetApiResponse(); 56 | var results = new List(); 57 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 58 | 59 | SetMockControllerExpectations( 60 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 61 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 62 | //mockController.MockObject.Execute(); 63 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 64 | var controllerResponse = mockController.MockObject.GetApiResponse(); 65 | Assert.IsNotNull(controllerResponse); 66 | 67 | Assert.IsNotNull(controllerResponse.paymentDetails); 68 | LogHelper.info(Logger, "decryptPaymentData: PaymentDetailsAmount:{0}", controllerResponse.paymentDetails.amount); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/deleteCustomerPaymentProfileControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class deleteCustomerPaymentProfileTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockdeleteCustomerPaymentProfileTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new deleteCustomerPaymentProfileRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new deleteCustomerPaymentProfileResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | }; 53 | 54 | var errorResponse = new ANetApiResponse(); 55 | var results = new List(); 56 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 57 | 58 | SetMockControllerExpectations( 59 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 60 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 61 | //mockController.MockObject.Execute(); 62 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 63 | var controllerResponse = mockController.MockObject.GetApiResponse(); 64 | Assert.IsNotNull(controllerResponse); 65 | 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/deleteCustomerProfileControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class deleteCustomerProfileTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockdeleteCustomerProfileTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new deleteCustomerProfileRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new deleteCustomerProfileResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | }; 53 | 54 | var errorResponse = new ANetApiResponse(); 55 | var results = new List(); 56 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 57 | 58 | SetMockControllerExpectations( 59 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 60 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 61 | //mockController.MockObject.Execute(); 62 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 63 | var controllerResponse = mockController.MockObject.GetApiResponse(); 64 | Assert.IsNotNull(controllerResponse); 65 | 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/deleteCustomerShippingAddressControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class deleteCustomerShippingAddressTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockdeleteCustomerShippingAddressTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new deleteCustomerShippingAddressRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new deleteCustomerShippingAddressResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | }; 53 | 54 | var errorResponse = new ANetApiResponse(); 55 | var results = new List(); 56 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 57 | 58 | SetMockControllerExpectations( 59 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 60 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 61 | //mockController.MockObject.Execute(); 62 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 63 | var controllerResponse = mockController.MockObject.GetApiResponse(); 64 | Assert.IsNotNull(controllerResponse); 65 | 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/getAUJobDetailsControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class getAUJobDetailsTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockgetAUJobDetailsTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new getAUJobDetailsRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new getAUJobDetailsResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | Yyyyy = Yyyy, 53 | }; 54 | 55 | var errorResponse = new ANetApiResponse(); 56 | var results = new List(); 57 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 58 | 59 | SetMockControllerExpectations( 60 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 61 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 62 | //mockController.MockObject.Execute(); 63 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 64 | var controllerResponse = mockController.MockObject.GetApiResponse(); 65 | Assert.IsNotNull(controllerResponse); 66 | 67 | Assert.IsNotNull(controllerResponse.Yyyyy); 68 | LogHelper.info(Logger, "getAUJobDetails: Details:{0}", controllerResponse.Yyyyy); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/getAUJobSummaryControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class getAUJobSummaryTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockgetAUJobSummaryTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new getAUJobSummaryRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new getAUJobSummaryResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | Yyyyy = Yyyy, 53 | }; 54 | 55 | var errorResponse = new ANetApiResponse(); 56 | var results = new List(); 57 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 58 | 59 | SetMockControllerExpectations( 60 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 61 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 62 | //mockController.MockObject.Execute(); 63 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 64 | var controllerResponse = mockController.MockObject.GetApiResponse(); 65 | Assert.IsNotNull(controllerResponse); 66 | 67 | Assert.IsNotNull(controllerResponse.Yyyyy); 68 | LogHelper.info(Logger, "getAUJobSummary: Details:{0}", controllerResponse.Yyyyy); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/getBatchStatisticsControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class getBatchStatisticsTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockgetBatchStatisticsTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new getBatchStatisticsRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var batchDetaisType = new batchDetailsType 49 | { 50 | batchId = "1234", 51 | }; 52 | var mockResponse = new getBatchStatisticsResponse 53 | { 54 | refId = "1234", 55 | sessionToken = "sessiontoken", 56 | batch = batchDetaisType, 57 | }; 58 | 59 | var errorResponse = new ANetApiResponse(); 60 | var results = new List(); 61 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 62 | 63 | SetMockControllerExpectations( 64 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 65 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 66 | //mockController.MockObject.Execute(); 67 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 68 | var controllerResponse = mockController.MockObject.GetApiResponse(); 69 | Assert.IsNotNull(controllerResponse); 70 | 71 | Assert.IsNotNull(controllerResponse.batch); 72 | LogHelper.info(Logger, "getBatchStatistics: Details:{0}", controllerResponse.batch); 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/getCustomerProfileIdsControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class getCustomerProfileIdsTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockgetCustomerProfileIdsTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new getCustomerProfileIdsRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new getCustomerProfileIdsResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | ids = new [] {"1234"}, 53 | }; 54 | 55 | var errorResponse = new ANetApiResponse(); 56 | var results = new List(); 57 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 58 | 59 | SetMockControllerExpectations( 60 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 61 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 62 | //mockController.MockObject.Execute(); 63 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 64 | var controllerResponse = mockController.MockObject.GetApiResponse(); 65 | Assert.IsNotNull(controllerResponse); 66 | 67 | Assert.IsNotNull(controllerResponse.ids); 68 | LogHelper.info(Logger, "getCustomerProfileIds: Details:{0}", controllerResponse.ids); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/getHostedPaymentPageControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class getHostedPaymentPageTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockgetHostedPaymentPageTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new getHostedPaymentPageRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new getHostedPaymentPageResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | token = "123123" 53 | }; 54 | 55 | var errorResponse = new ANetApiResponse(); 56 | var results = new List(); 57 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 58 | 59 | SetMockControllerExpectations( 60 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 61 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 62 | //mockController.MockObject.Execute(); 63 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 64 | var controllerResponse = mockController.MockObject.GetApiResponse(); 65 | Assert.IsNotNull(controllerResponse); 66 | 67 | Assert.IsNotNull(controllerResponse.token); 68 | LogHelper.info(Logger, "getHostedPaymentPage: Details:{0}", controllerResponse.token); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/getHostedProfilePageControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class getHostedProfilePageTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockgetHostedProfilePageTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new getHostedProfilePageRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new getHostedProfilePageResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | token = "token1234", 53 | }; 54 | 55 | var errorResponse = new ANetApiResponse(); 56 | var results = new List(); 57 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 58 | 59 | SetMockControllerExpectations( 60 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 61 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 62 | //mockController.MockObject.Execute(); 63 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 64 | var controllerResponse = mockController.MockObject.GetApiResponse(); 65 | Assert.IsNotNull(controllerResponse); 66 | 67 | Assert.IsNotNull(controllerResponse.token); 68 | LogHelper.info(Logger, "getHostedProfilePage: Details:{0}", controllerResponse.token); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/getMerchantDetailsControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class getMerchantDetailsTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockgetMerchantDetailsTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new getMerchantDetailsRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new getMerchantDetailsResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | gatewayId = "41234" 53 | }; 54 | 55 | var errorResponse = new ANetApiResponse(); 56 | var results = new List(); 57 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 58 | 59 | SetMockControllerExpectations( 60 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 61 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 62 | //mockController.MockObject.Execute(); 63 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 64 | var controllerResponse = mockController.MockObject.GetApiResponse(); 65 | Assert.IsNotNull(controllerResponse); 66 | 67 | Assert.IsNotNull(controllerResponse.gatewayId); 68 | LogHelper.info(Logger, "getMerchantDetails: Details:{0}", controllerResponse.gatewayId); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/getTransactionListForCustomerControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class getTransactionListForCustomerTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockgetTransactionListForCustomerTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new getTransactionListForCustomerRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new getTransactionListForCustomerResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | Yyyyy = Yyyy, 53 | }; 54 | 55 | var errorResponse = new ANetApiResponse(); 56 | var results = new List(); 57 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 58 | 59 | SetMockControllerExpectations( 60 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 61 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 62 | //mockController.MockObject.Execute(); 63 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 64 | var controllerResponse = mockController.MockObject.GetApiResponse(); 65 | Assert.IsNotNull(controllerResponse); 66 | 67 | Assert.IsNotNull(controllerResponse.Yyyyy); 68 | LogHelper.info(Logger, "getTransactionListForCustomer: Details:{0}", controllerResponse.Yyyyy); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/isAliveControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class isAliveTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockisAliveTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new ANetApiRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType() { name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey }, 47 | }; 48 | var mockResponse = new isAliveResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | }; 53 | 54 | var errorResponse = new ANetApiResponse(); 55 | var results = new List(); 56 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 57 | 58 | SetMockControllerExpectations( 59 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 60 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 61 | //mockController.MockObject.Execute(); 62 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 63 | var controllerResponse = mockController.MockObject.GetApiResponse(); 64 | Assert.IsNotNull(controllerResponse); 65 | 66 | //Assert.IsNotNull(controllerResponse.Yyyyy); 67 | LogHelper.info(Logger, "isAlive: Details:{0}", controllerResponse); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/logoutControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class logoutTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MocklogoutTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new logoutRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new logoutResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | }; 53 | 54 | var errorResponse = new ANetApiResponse(); 55 | var results = new List(); 56 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 57 | 58 | SetMockControllerExpectations( 59 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 60 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 61 | //mockController.MockObject.Execute(); 62 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 63 | var controllerResponse = mockController.MockObject.GetApiResponse(); 64 | Assert.IsNotNull(controllerResponse); 65 | 66 | //Assert.IsNotNull(controllerResponse.); 67 | LogHelper.info(Logger, "logout: Details:{0}", controllerResponse); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/mobileDeviceRegistrationControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class mobileDeviceRegistrationTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockmobileDeviceRegistrationTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new mobileDeviceRegistrationRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new mobileDeviceRegistrationResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | }; 53 | 54 | var errorResponse = new ANetApiResponse(); 55 | var results = new List(); 56 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 57 | 58 | SetMockControllerExpectations( 59 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 60 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 61 | //mockController.MockObject.Execute(); 62 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 63 | var controllerResponse = mockController.MockObject.GetApiResponse(); 64 | Assert.IsNotNull(controllerResponse); 65 | 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/securePaymentContainerControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class securePaymentContainerTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MocksecurePaymentContainerTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new securePaymentContainerRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new securePaymentContainerResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | }; 53 | 54 | var errorResponse = new ANetApiResponse(); 55 | var results = new List(); 56 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 57 | 58 | SetMockControllerExpectations( 59 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 60 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 61 | //mockController.MockObject.Execute(); 62 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 63 | var controllerResponse = mockController.MockObject.GetApiResponse(); 64 | Assert.IsNotNull(controllerResponse); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/sendCustomerTransactionReceiptControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class sendCustomerTransactionReceiptTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MocksendCustomerTransactionReceiptTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new sendCustomerTransactionReceiptRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new sendCustomerTransactionReceiptResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | }; 53 | 54 | var errorResponse = new ANetApiResponse(); 55 | var results = new List(); 56 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 57 | 58 | SetMockControllerExpectations( 59 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 60 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 61 | //mockController.MockObject.Execute(); 62 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 63 | var controllerResponse = mockController.MockObject.GetApiResponse(); 64 | Assert.IsNotNull(controllerResponse); 65 | 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/transactionControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | //using System; 4 | //using System.Collections.Generic; 5 | //using AuthorizeNet.Api.Contracts.V1; 6 | //using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | //using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class transactionTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MocktransactionTest() 41 | { 42 | //object transactionRequest does not exist 43 | /* 44 | //define all mocked objects as final 45 | var mockController = GetMockController(); 46 | var mockRequest = new transactionRequest 47 | { 48 | merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 49 | }; 50 | var mockResponse = new transactionResponse 51 | { 52 | refId = "1234", 53 | sessionToken = "sessiontoken", 54 | Yyyyy = Yyyy, 55 | }; 56 | 57 | var errorResponse = new ANetApiResponse(); 58 | var results = new List(); 59 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 60 | 61 | SetMockControllerExpectations( 62 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 63 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 64 | //mockController.MockObject.Execute(); 65 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 66 | var controllerResponse = mockController.MockObject.GetApiResponse(); 67 | Assert.IsNotNull(controllerResponse); 68 | 69 | Assert.IsNotNull(controllerResponse.Yyyyy); 70 | LogHelper.info(Logger, "transaction: Details:{0}", controllerResponse.Yyyyy); 71 | */ 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/transactionResponseEmvControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class transactionResponseEmvTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MocktransactionResponseEmvTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new transactionResponseEmvRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new transactionResponseEmvResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | Yyyyy = Yyyy, 53 | }; 54 | 55 | var errorResponse = new ANetApiResponse(); 56 | var results = new List(); 57 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 58 | 59 | SetMockControllerExpectations( 60 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 61 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 62 | //mockController.MockObject.Execute(); 63 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 64 | var controllerResponse = mockController.MockObject.GetApiResponse(); 65 | Assert.IsNotNull(controllerResponse); 66 | 67 | Assert.IsNotNull(controllerResponse.Yyyyy); 68 | LogHelper.info(Logger, "transactionResponseEmv: Details:{0}", controllerResponse.Yyyyy); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/updateCustomerProfileControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class updateCustomerProfileTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockupdateCustomerProfileTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new updateCustomerProfileRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new updateCustomerProfileResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | }; 53 | 54 | var errorResponse = new ANetApiResponse(); 55 | var results = new List(); 56 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 57 | 58 | SetMockControllerExpectations( 59 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 60 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 61 | //mockController.MockObject.Execute(); 62 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 63 | var controllerResponse = mockController.MockObject.GetApiResponse(); 64 | Assert.IsNotNull(controllerResponse); 65 | 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/updateCustomerShippingAddressControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class updateCustomerShippingAddressTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockupdateCustomerShippingAddressTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new updateCustomerShippingAddressRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new updateCustomerShippingAddressResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | }; 53 | 54 | var errorResponse = new ANetApiResponse(); 55 | var results = new List(); 56 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 57 | 58 | SetMockControllerExpectations( 59 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 60 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 61 | //mockController.MockObject.Execute(); 62 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 63 | var controllerResponse = mockController.MockObject.GetApiResponse(); 64 | Assert.IsNotNull(controllerResponse); 65 | 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/updateMerchantDetailsControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class updateMerchantDetailsTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockupdateMerchantDetailsTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new updateMerchantDetailsRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType() {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new updateMerchantDetailsResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | }; 53 | 54 | var errorResponse = new ANetApiResponse(); 55 | var results = new List(); 56 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 57 | 58 | SetMockControllerExpectations( 59 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 60 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 61 | //mockController.MockObject.Execute(); 62 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 63 | var controllerResponse = mockController.MockObject.GetApiResponse(); 64 | Assert.IsNotNull(controllerResponse); 65 | 66 | 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /AuthorizeNETtest/Api/Controllers/MockTest/updateSplitTenderGroupControllerTest.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Api.Controllers.MockTest 2 | { 3 | using System; 4 | using System.Collections.Generic; 5 | using AuthorizeNet.Api.Contracts.V1; 6 | using AuthorizeNet.Api.Controllers; 7 | using AuthorizeNet.Api.Controllers.Test; 8 | using AuthorizeNet.Util; 9 | using NUnit.Framework; 10 | 11 | [TestFixture] 12 | public class updateSplitTenderGroupTest : ApiCoreTestBase 13 | { 14 | 15 | [TestFixtureSetUp] 16 | public new static void SetUpBeforeClass() 17 | { 18 | ApiCoreTestBase.SetUpBeforeClass(); 19 | } 20 | 21 | [TestFixtureTearDown] 22 | public new static void TearDownAfterClass() 23 | { 24 | ApiCoreTestBase.TearDownAfterClass(); 25 | } 26 | 27 | [SetUp] 28 | public new void SetUp() 29 | { 30 | base.SetUp(); 31 | } 32 | 33 | [TearDown] 34 | public new void TearDown() 35 | { 36 | base.TearDown(); 37 | } 38 | 39 | [Test] 40 | public void MockupdateSplitTenderGroupTest() 41 | { 42 | //define all mocked objects as final 43 | var mockController = GetMockController(); 44 | var mockRequest = new updateSplitTenderGroupRequest 45 | { 46 | merchantAuthentication = new merchantAuthenticationType {name = "mocktest", Item = "mockKey", ItemElementName = ItemChoiceType.transactionKey}, 47 | }; 48 | var mockResponse = new updateSplitTenderGroupResponse 49 | { 50 | refId = "1234", 51 | sessionToken = "sessiontoken", 52 | }; 53 | 54 | var errorResponse = new ANetApiResponse(); 55 | var results = new List(); 56 | const messageTypeEnum messageTypeOk = messageTypeEnum.Ok; 57 | 58 | SetMockControllerExpectations( 59 | mockController.MockObject, mockRequest, mockResponse, errorResponse, results, messageTypeOk); 60 | mockController.MockObject.Execute(AuthorizeNet.Environment.CUSTOM); 61 | //mockController.MockObject.Execute(); 62 | // or var controllerResponse = mockController.MockObject.ExecuteWithApiResponse(AuthorizeNet.Environment.CUSTOM); 63 | var controllerResponse = mockController.MockObject.GetApiResponse(); 64 | Assert.IsNotNull(controllerResponse); 65 | 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /AuthorizeNETtest/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /AuthorizeNETtest/BaseTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using System; 3 | using System.Configuration; 4 | using AuthorizeNet.Utility; 5 | 6 | namespace AuthorizeNETtest 7 | { 8 | /// 9 | /// Summary description for UnitTest1 10 | /// 11 | [TestFixture] 12 | public class BaseTest 13 | { 14 | protected static readonly WebRequestCreateLocal LocalRequestObject = new WebRequestCreateLocal(); 15 | protected string ApiLogin; 16 | protected string TransactionKey; 17 | 18 | public BaseTest() 19 | { 20 | #if USELOCAL 21 | WebRequest.RegisterPrefix("https://", LocalRequestObject); 22 | #endif 23 | } 24 | 25 | /// 26 | /// CheckApiLoginTransactionKey - make sure that we are not using the default invalid ApiLogin and TransactionKey. 27 | /// 28 | protected string CheckApiLoginTransactionKey() 29 | { 30 | ApiLogin = AuthorizeNet.Test.UnitTestData.GetPropertyFromNames(AuthorizeNet.Util.Constants.EnvApiLoginid, AuthorizeNet.Util.Constants.PropApiLoginid); 31 | TransactionKey = AuthorizeNet.Test.UnitTestData.GetPropertyFromNames(AuthorizeNet.Util.Constants.EnvTransactionKey, AuthorizeNet.Util.Constants.PropTransactionKey); 32 | 33 | string sRet = ""; 34 | if ((string.IsNullOrEmpty(ApiLogin)) || (ApiLogin.Trim().Length == 0) 35 | || (string.IsNullOrEmpty(TransactionKey)) || (TransactionKey.Trim().Length == 0)) 36 | { 37 | LoadLoginTranskey(); 38 | } 39 | 40 | if ((string.IsNullOrEmpty(ApiLogin)) || (ApiLogin.Trim().Length == 0) 41 | || (string.IsNullOrEmpty(TransactionKey)) || (TransactionKey.Trim().Length == 0)) 42 | { 43 | sRet = "Invalid Login / Password: blank \n"; 44 | } 45 | 46 | #if !USELOCAL 47 | if ((ApiLogin == "ApiLogin") || (TransactionKey == "TransactionKey")) 48 | { 49 | sRet += "Invalid Login / Password \n"; 50 | } 51 | #endif 52 | return sRet; 53 | } 54 | 55 | private void LoadLoginTranskey() 56 | { 57 | ApiLogin = ConfigurationManager.AppSettings["ApiLogin"]; 58 | TransactionKey = ConfigurationManager.AppSettings["TransactionKey"]; 59 | } 60 | 61 | protected decimal getValidAmount() 62 | { 63 | var rnd = new AnetRandom(DateTime.Now.Millisecond); 64 | 65 | return (decimal)rnd.Next(9999) / 100; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /AuthorizeNETtest/NMock3/NMock3 Cheat Sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/AuthorizeNETtest/NMock3/NMock3 Cheat Sheet.pdf -------------------------------------------------------------------------------- /AuthorizeNETtest/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("AuthorizeNETtest")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Visa Inc")] 12 | [assembly: AssemblyProduct("AuthorizeNETtest")] 13 | [assembly: AssemblyCopyright("Copyright © Visa Inc 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM componenets. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("4f3c1454-321b-4ef5-9455-e0934ed5d118")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /AuthorizeNETtest/UnitTestData.cs: -------------------------------------------------------------------------------- 1 | namespace AuthorizeNet.Test 2 | { 3 | using System; 4 | using System.Configuration; 5 | using System.Linq; 6 | using AuthorizeNet.Util; 7 | 8 | public abstract class UnitTestData 9 | { 10 | protected static string ApiLoginId; 11 | protected static string TransactionKey; 12 | protected static string MerchantMd5Key; 13 | 14 | private static readonly Log Logger = LogFactory.getLog(typeof(UnitTestData)); 15 | 16 | /** 17 | * Default static constructor 18 | */ 19 | static UnitTestData() 20 | { 21 | //getPropertyFromNames get the value from properties file or environment 22 | ApiLoginId = GetPropertyFromNames(Constants.EnvApiLoginid, Constants.PropApiLoginid); 23 | TransactionKey = GetPropertyFromNames(Constants.EnvTransactionKey, Constants.PropTransactionKey); 24 | MerchantMd5Key = GetPropertyFromNames(Constants.EnvMd5Hashkey, Constants.PropMd5Hashkey); 25 | 26 | if (null == ApiLoginId || null == TransactionKey) 27 | { 28 | throw new ArgumentException("LoginId and/or TransactionKey have not been set."); 29 | } 30 | else 31 | { 32 | LogHelper.info(Logger, "PropertyValues: ApiLoginId:'{0}', TransactionKey:'{1}', MD5Key:'{2}' ", ApiLoginId, TransactionKey, MerchantMd5Key); 33 | } 34 | } 35 | 36 | public static string GetPropertyFromNames(string pFirstName, string pSecondName) 37 | { 38 | var value = AuthorizeNet.Environment.GetProperty(pFirstName) ?? 39 | AuthorizeNet.Environment.GetProperty(pSecondName); 40 | 41 | return value; 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /AuthorizeNETtest/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /AuthorizeNet.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | AuthorizeNet 5 | 2.0.4 6 | AuthorizeNet 7 | Authorize.Net 8 | AuthorizeNet 9 | https://github.com/AuthorizeNet/sdk-dotnet/blob/master/LICENSE.txt 10 | https://github.com/AuthorizeNet/sdk-dotnet 11 | http://developer.authorize.net/resources/images/favicon.ico 12 | false 13 | Use this SDK to integrate with the Authorize.Net APIs for Payment Transactions, Recurring Billing, Customer Payment Profiles and Reporting. 14 | Authorize.Net SDK for .Net 15 | Payments API Authorize.Net 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | + Thanks for contributing to the Authorize.Net Dotnet SDK. 2 | 3 | + Before you submit a pull request, we ask that you consider the following: 4 | 5 | - Submit an issue to state the problem your pull request solves or the funtionality that it adds. We can then advise on the feasability of the pull request, and let you know if there are other possible solutions. 6 | - Part of the SDK is auto-generated based on the XML schema. Due to this auto-generation, we cannot merge contributions for request or response classes. You are welcome to open an issue to report problems or suggest improvements. Auto-generated classes include all files inside [Contracts/v1](https://github.com/AuthorizeNet/sdk-dotnet/tree/master/Authorize.NET/Api/Contracts/V1) and [Controllers](https://github.com/AuthorizeNet/sdk-dotnet/tree/master/Authorize.NET/Api/Controllers) folders, except [Controllers/Bases](https://github.com/AuthorizeNet/sdk-dotnet/tree/master/Authorize.NET/Api/Controllers/Bases). 7 | - Files marked as deprecated are no longer supported. Issues and pull requests for changes to these deprecated files will be closed. 8 | - Recent changes will be in [the future branch](https://github.com/AuthorizeNet/sdk-dotnet/tree/future). Before submitting an issue or pull request, check the future branch first to see if a fix has already been merged. 9 | - **Always use the future branch for pull requests.** We will first merge pull requests to the future branch, before pushing to the master branch for the next release. -------------------------------------------------------------------------------- /LocalTestRun.testrunconfig: -------------------------------------------------------------------------------- 1 | 2 | 3 | This is a default test run configuration for a local test run. 4 | 5 | -------------------------------------------------------------------------------- /NUnit-2.6.3/Logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/Logo.ico -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/NUnitTests.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/NUnitTests.nunit: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/agent.conf: -------------------------------------------------------------------------------- 1 | 2 | 8080 3 | . 4 | -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/agent.log.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/framework/nunit.framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/framework/nunit.framework.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/framework/nunit.mocks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/framework/nunit.mocks.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/framework/pnunit.framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/framework/pnunit.framework.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/launcher.log.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Ellipsis.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Ellipsis.gif -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Circles/Failure.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Circles/Failure.jpg -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Circles/Ignored.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Circles/Ignored.jpg -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Circles/Inconclusive.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Circles/Inconclusive.jpg -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Circles/Skipped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Circles/Skipped.jpg -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Circles/Success.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Circles/Success.jpg -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Classic/Failure.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Classic/Failure.jpg -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Classic/Ignored.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Classic/Ignored.jpg -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Classic/Inconclusive.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Classic/Inconclusive.jpg -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Classic/Skipped.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Classic/Skipped.jpg -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Classic/Success.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Classic/Success.jpg -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Default/Failure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Default/Failure.png -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Default/Ignored.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Default/Ignored.png -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Default/Inconclusive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Default/Inconclusive.png -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Default/Skipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Default/Skipped.png -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Default/Success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Default/Success.png -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Visual Studio/Failure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Visual Studio/Failure.png -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Visual Studio/Ignored.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Visual Studio/Ignored.png -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Visual Studio/Inconclusive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Visual Studio/Inconclusive.png -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Visual Studio/SeriousWarning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Visual Studio/SeriousWarning.png -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Visual Studio/Skipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Visual Studio/Skipped.png -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/Tree/Visual Studio/Success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/Tree/Visual Studio/Success.png -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/pinned.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/pinned.gif -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Images/unpinned.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Images/unpinned.gif -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/NSubstitute.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/NSubstitute.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/Rhino.Mocks.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/Rhino.Mocks.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/log4net.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/log4net.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/nunit-console-runner.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/nunit-console-runner.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/nunit-gui-runner.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/nunit-gui-runner.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/nunit.core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/nunit.core.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/nunit.core.interfaces.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/nunit.core.interfaces.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/nunit.uiexception.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/nunit.uiexception.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/nunit.uikit.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/nunit.uikit.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/lib/nunit.util.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/lib/nunit.util.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/nunit-agent-x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/nunit-agent-x86.exe -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/nunit-agent-x86.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/nunit-agent.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/nunit-agent.exe -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/nunit-agent.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/nunit-console-x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/nunit-console-x86.exe -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/nunit-console-x86.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/nunit-console.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/nunit-console.exe -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/nunit-console.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/nunit-editor.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/nunit-editor.exe -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/nunit-x86.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/nunit-x86.exe -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/nunit-x86.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/nunit.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/nunit.exe -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/nunit.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/nunit.framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/nunit.framework.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/pnunit-agent.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/pnunit-agent.exe -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/pnunit-launcher.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/pnunit-launcher.exe -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/pnunit.framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/pnunit.framework.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/pnunit.tests.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/pnunit.tests.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/runpnunit.bat: -------------------------------------------------------------------------------- 1 | start pnunit-agent 8080 . 2 | start pnunit-agent 8081 . 3 | pnunit-launcher test.conf 4 | -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/mock-assembly.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/mock-assembly.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/nonamespace-assembly.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/nonamespace-assembly.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/nunit-console.tests.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/nunit-console.tests.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/nunit-editor.tests.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/nunit-editor.tests.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/nunit-gui.tests.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/nunit-gui.tests.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/nunit.core.tests.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/nunit.core.tests.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/nunit.core.tests.net45.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/nunit.core.tests.net45.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/nunit.framework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/nunit.framework.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/nunit.framework.tests.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/nunit.framework.tests.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/nunit.framework.tests.net45.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/nunit.framework.tests.net45.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/nunit.mocks.tests.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/nunit.mocks.tests.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/nunit.uiexception.tests.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/nunit.uiexception.tests.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/nunit.uikit.tests.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/nunit.uikit.tests.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/nunit.util.tests.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/nunit.util.tests.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/test-assembly-net45.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/test-assembly-net45.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/test-assembly.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/test-assembly.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/bin/tests/test-utilities.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/bin/tests/test-utilities.dll -------------------------------------------------------------------------------- /NUnit-2.6.3/license.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/NUnit-2.6.3/license.txt -------------------------------------------------------------------------------- /packages/NMock3.3.5.44/NMock3.3.5.44.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/packages/NMock3.3.5.44/NMock3.3.5.44.nupkg -------------------------------------------------------------------------------- /packages/NMock3.3.5.44/content/NMock3/NMock3 Cheat Sheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/packages/NMock3.3.5.44/content/NMock3/NMock3 Cheat Sheet.pdf -------------------------------------------------------------------------------- /packages/NMock3.3.5.44/lib/net35/NMock3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/packages/NMock3.3.5.44/lib/net35/NMock3.dll -------------------------------------------------------------------------------- /packages/NMock3.3.5.44/lib/net40/NMock3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/packages/NMock3.3.5.44/lib/net40/NMock3.dll -------------------------------------------------------------------------------- /packages/NMock3.3.5.44/lib/sl40/NMock3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AuthorizeNet/sdk-dotnet/a2ba3fd26612809667bc6580519d111507658646/packages/NMock3.3.5.44/lib/sl40/NMock3.dll -------------------------------------------------------------------------------- /packages/repositories.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /scripts/EnumTemplate.cst: -------------------------------------------------------------------------------- 1 | 2 | foreach (var anEnum in Enum.GetValues(typeof(ENUMNAME))) 3 | { 4 | var aValue = anEnum.ToString(); 5 | ENUMNAME enumFromValue; 6 | Assert.IsTrue(Enum.TryParse(aValue, out enumFromValue)); 7 | Assert.AreEqual(anEnum, enumFromValue); 8 | } 9 | -------------------------------------------------------------------------------- /scripts/generateTestForEnums.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | CALL "%~dp0\validateCygwinBinaries.cmd" 4 | IF "1"=="%ERRORLEVEL%" ( 5 | @ECHO Invalid or incomplete Cygwin installation. Install cygwin and its components viz. 6 | @ECHO grep sed perl cut touch wget sort 7 | EXIT /b 1 8 | ) 9 | SET CYGWIN_EXE=%CYGWIN_HOME%\bin 10 | 11 | @ECHO Generating enum tests 12 | SET SRCDIR=Authorize.NET\Api\Contracts\V1 13 | IF NOT EXIST "%SRCDIR%" ( 14 | @ECHO "%SRCDIR%" Does not exist 15 | EXIT /b 1 16 | ) 17 | SET CYGWIN=NODOSFILEWARNING 18 | SET OUTFILE=%TEMP%\AllGeneratedEnumTest.cs 19 | SET TEMPLATE=%CD%\scripts\EnumTemplate.cst 20 | PUSHD "%SRCDIR%" 21 | "%CYGWIN_EXE%\grep.exe" -i "public enum" AnetApiSchema.generated.cs | "%CYGWIN_EXE%\cut.exe" -c17- | "%CYGWIN_EXE%\cut.exe" -f1 -d" " > %TEMP%\enum.lst 22 | 23 | @ECHO.> "%OUTFILE%" 24 | @ECHO //Generated by cs-enum-test on %date%-%time% >> "%OUTFILE%" 25 | @ECHO [Test] >> "%OUTFILE%" 26 | @ECHO public void AllEnumTest() >> "%OUTFILE%" 27 | @ECHO {>> "%OUTFILE%" 28 | @ECHO. 29 | @ECHO. 30 | 31 | FOR /f %%x IN ( %TEMP%\enum.lst) DO ( 32 | @ECHO Processing %%x; 33 | COPY %TEMPLATE% %TEMP%\%%x.cs 1>NUL 34 | "%CYGWIN_EXE%\perl.exe" -pi -w -e 's/ENUMNAME/%%x/g;' %TEMP%\%%x.cs 2>NUL 35 | TYPE %TEMP%\%%x.cs >> "%OUTFILE%" 36 | ) 37 | @ECHO } >> "%OUTFILE%" 38 | @ECHO.>> "%OUTFILE%" 39 | POPD 40 | @ECHO. 41 | @ECHO. 42 | @ECHO The generated test is in "%OUTFILE%" 43 | -------------------------------------------------------------------------------- /scripts/getXsdWsdl.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL "%~dp0\validateCygwinBinaries.cmd" 3 | IF "1"=="%ERRORLEVEL%" ( 4 | @ECHO Invalid or incomplete Cygwin installation. Install cygwin and its components viz. 5 | @ECHO grep sed perl cut touch wget sort 6 | EXIT /b 1 7 | ) 8 | SET CYGWIN_EXE=%CYGWIN_HOME%\bin 9 | 10 | SETLOCAL 11 | @ECHO Starting %DATE%-%TIME% 12 | 13 | IF "%1"=="" ( 14 | @ECHO Invalid Local XSD "%1" 15 | EXIT /b 1 16 | ) 17 | IF "%2"=="" ( 18 | @ECHO Invalid Local WSDL "%2" 19 | EXIT /b 1 20 | ) 21 | 22 | SET LOCALXSD=%1 23 | SET LOCALWSDL=%2 24 | 25 | SET PROXY=%https.proxyHost%:%https.proxyPort% 26 | SET HOST=apitest.authorize.net 27 | SET PROTOCOL=https 28 | 29 | @REM SET PROXY=%http.proxyHost%:%http.proxyPort% 30 | @REM SET HOST=ww730vSmBu114.%USERDNSDOMAIN% 31 | @REM SET PROTOCOL=http 32 | 33 | SET XSD=%PROTOCOL%://%HOST%/xml/v1/schema/AnetApiSchema.xsd 34 | SET WSDL=%PROTOCOL%://%HOST%/ANetApiWS/ANetApiWS.asmx?wsdl 35 | 36 | @ECHO Fetching XSD from:%XSD% 37 | @ECHO Fetching WSDL from:%WSDL% 38 | @ECHO Press Enter to continue 39 | pause 40 | DEL /Q %LOCALXSD% 41 | DEL /Q %LOCALWSDL% 42 | 43 | @ECHO Fetching Schema: %XSD% 44 | bitsadmin.exe /transfer "XSD Download" /DOWNLOAD %XSD% %LOCALXSD% 45 | IF NOT "%ERRORLEVEL%"=="0" ( 46 | @ECHO Unable to fetch "%XSD%" 47 | EXIT /b 1 48 | ) 49 | 50 | REM @ECHO Fetching WSDL: %WSDL% 51 | REM bitsadmin.exe /transfer "WSDL Download" /DOWNLOAD %WSDL% %LOCALWSDL% 52 | REM IF NOT "%ERRORLEVEL%"=="0" ( 53 | REM SET ERRORLEVEL= 54 | REM IF EXIST "ANetApiWS.asmx@wsdl" ( 55 | REM DEL /Q "ANetApiWS.asmx@wsdl" 56 | REM ) 57 | REM @ECHO Unable to fetch "%WSDL%" via bitsadmin, trying wget 58 | REM @rem "%CYGWIN_EXE%\wget.exe" %WSDL% 59 | REM IF "%ERRORLEVEL%"=="1" ( 60 | REM @ECHO Unable to fetch "%WSDL%" via wget 61 | REM EXIT /b 1 62 | REM ) 63 | REM IF EXIST "ANetApiWS.asmx@wsdl" ( 64 | REM COPY "ANetApiWS.asmx@wsdl" "%LOCALWSDL%" 65 | REM DEL /Q "ANetApiWS.asmx@wsdl" 66 | REM ) ELSE ( 67 | REM @rem @ECHO Unable to fetch "%WSDL%" via wget 68 | REM @ECHO Escape fetching %WSDL% 69 | REM @REM EXIT /b 1 70 | REM ) 71 | REM ) 72 | IF NOT EXIST "%LOCALXSD%" ( 73 | @ECHO Unable to find "%LOCALXSD%" 74 | EXIT /b 1 75 | ) 76 | @rem IF NOT EXIST "%LOCALWSDL%" ( 77 | @rem @ECHO Unable to find "%LOCALWSDL%" 78 | @rem @REM EXIT /b 1 79 | @rem ) 80 | @ECHO %0 Exit Code:'%ERRORLEVEL%' 81 | ENDLOCAL 82 | 83 | @ECHO FINISHED %DATE%-%TIME% 84 | -------------------------------------------------------------------------------- /scripts/masterUpdate.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | CALL "%~dp0\validateCygwinBinaries.cmd" 4 | IF "1"=="%ERRORLEVEL%" ( 5 | @ECHO Invalid or incomplete Cygwin installation. Install cygwin and its components viz. 6 | @ECHO grep sed perl cut touch wget sort 7 | EXIT /b 1 8 | ) 9 | SET CYGWIN_EXE=%CYGWIN_HOME%\bin 10 | 11 | @ECHO. Started at %date%-%time% 12 | @ECHO This script will update all the generated code 13 | @ECHO. 14 | 15 | FOR %%x IN ( generateObjectsFromXsd.cmd generateControllersFromTemplate.cmd generateTestControllersFromTemplate.cmd generateTestForEnums.cmd generateRequestFactorySpecified.cmd) DO ( 16 | @ECHO Executing script "%%x" 17 | CALL "%~dp0%%x" 18 | IF "1"=="%ERRORLEVEL%" ( 19 | @ECHO. ######################################################################## 20 | @ECHO Encountered error during execution of "%~dp0%%x" 21 | @ECHO See logs or output above. 22 | @ECHO Exiting, Update ***NOT*** complete. 23 | EXIT /b 1 24 | ) 25 | ) 26 | @ECHO. 27 | @ECHO Exiting, Update completed succesfully. 28 | @ECHO Compile, run tests and commit in git-hub. 29 | @ECHO. Completed at %date%-%time% -------------------------------------------------------------------------------- /scripts/prepareBinariesForVeracodeScan.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | @ECHO Script to prepare dlls for VeraCode scan 3 | 4 | IF NOT EXIST "Authorize.NET\bin\USELOCAL\AuthorizeNet.dll" ( 5 | @ECHO AuthorizeNet.dll not found, build and make sure yo are in correct working directory 6 | EXIT /b 1 7 | ) 8 | SET target=veracode 9 | IF NOT EXIST "%TARGET%" (MD "%TARGET%") 10 | 11 | COPY /y Authorize.NET\bin\USELOCAL\AuthorizeNet.* "%TARGET%"\. 12 | COPY /y AuthorizeNETtest\bin\USELOCAL\AuthorizeNet_Accessor.* "%TARGET%"\. 13 | COPY /y AuthorizeNETtest\bin\USELOCAL\AuthorizeNETtest.* "%TARGET%"\. 14 | COPY /y CoffeeShopWebApp\bin\CoffeeShopWebApp.* "%TARGET%"\. 15 | 16 | @ECHO Looking for Microsoft.VisualStudio.QualityTools.UnitTestFramework 17 | SET MSVSTEST=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll 18 | IF NOT EXIST "%MSVSTEST%" ( 19 | @ECHO "%MSVSTEST%" not found 20 | EXIT /b 1 21 | ) 22 | COPY /y "%MSVSTEST%" "%TARGET%"\. 23 | -------------------------------------------------------------------------------- /scripts/validateCygwinBinaries.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | @ECHO Validating Cygwin installation and its required components 4 | 5 | IF ""=="%CYGWIN_HOME%" ( 6 | @ECHO CYGWIN_HOME not set. Pl. make sure cygwin is installed and set CYGWIN_HOME to point to it. 7 | EXIT /b 1 8 | ) 9 | IF NOT EXIST "%CYGWIN_HOME%" ( 10 | @ECHO %CYGWIN_HOME% does not exist. 11 | EXIT /b 1 12 | ) 13 | IF NOT EXIST "%CYGWIN_HOME%\bin" ( 14 | @ECHO %CYGWIN_HOME%\bin does not exist. 15 | EXIT /b 1 16 | ) 17 | SET CYGWIN_EXE=%CYGWIN_HOME%\bin 18 | FOR %%x IN (grep sed perl cut touch wget sort) DO ( 19 | IF NOT EXIST "%CYGWIN_EXE%\%%x.exe" ( 20 | @ECHO "%CYGWIN_EXE%\%%x.exe" does not exist. Pl. make sure to install cygwin utility "%%x" 21 | EXIT /b 1 22 | ) 23 | ) 24 | --------------------------------------------------------------------------------