public AuthorizeNetPaymentProvider(string apiUserName, string apiTransactionKey, string isInTestMode, string isLive) { Validator.ValidateStringArgumentIsNotNullOrEmptyString(apiUserName, "apiUserName"); Validator.ValidateStringArgumentIsNotNullOrEmptyString(apiTransactionKey, "apiTransactionKey"); Validator.ValidateStringArgumentIsNotNullOrEmptyString(isInTestMode, "isInTestMode"); Validator.ValidateStringArgumentIsNotNullOrEmptyString(isLive, "isLive"); bool IsInTestMode = true; //default to test mode bool isParsed = bool.TryParse(isInTestMode, out IsInTestMode); bool IsLive = false; //default to the sandbox isParsed = bool.TryParse(isLive, out IsLive); _authorizeService = new AuthorizeNET.AuthorizeService(apiUserName, apiTransactionKey, IsInTestMode, IsLive); }
public AuthorizeNetPaymentProvider(string apiUserName, string apiTransactionKey, string isInTestMode, string isLive) { Validator.ValidateStringArgumentIsNotNullOrEmptyString(apiUserName, "apiUserName"); Validator.ValidateStringArgumentIsNotNullOrEmptyString(apiTransactionKey, "apiTransactionKey"); Validator.ValidateStringArgumentIsNotNullOrEmptyString(isInTestMode, "isInTestMode"); Validator.ValidateStringArgumentIsNotNullOrEmptyString(isLive, "isLive"); bool IsInTestMode = true; //default to test mode bool isParsed = bool.TryParse(isInTestMode, out IsInTestMode); bool IsLive = false; //default to the sandbox isParsed = bool.TryParse(isLive, out IsLive); _authorizeService = new AuthorizeNET.AuthorizeService(apiUserName, apiTransactionKey, IsInTestMode, IsLive); }