예제 #1
0
        public void ValidVisaCardTest()
        {
            // Arrange
            var mLogger = Mock.Of <ILogger <CreditCardValidatorController> >();

            var mController = new CreditCardValidatorController(mLogger);

            var mCreditCard = new CreditCard
            {
                CardOwner  = "Claudio Godoi",
                CardNumber = "4111111111111111",
                IssueDate  = "11/2020",
                Cvc        = "123"
            };

            var mValidator = new CreditCardValidator();

            var mValResult = mValidator.Validate(mCreditCard);

            Assert.True(mValResult.IsValid);

            IActionResult mActionResult = mController.Post(mCreditCard);

            // Assert
            Assert.NotNull(mActionResult);
            OkObjectResult mResult = mActionResult as OkObjectResult;

            Assert.NotNull(mResult);

            var mResponse = mResult.Value as CreditCardApiResponse;

            Assert.Equal(CreditCardHelper.CardType.Visa.ToString(), mResponse.CreditCardType);
        }
예제 #2
0
        public void BillingZipcode_Is_5_Plus_4_Digits_Is_Valid()
        {
            // Arrange
            var validatior = new CreditCardValidator();
            var account    = BuildCreditCard(billingZip: "84101-7331");

            // Act
            var result = validatior.Validate(account);

            // Assert
            Assert.Empty(result.Errors);
        }
예제 #3
0
        public void BillingZipcode_Is_Canadian_Postal_Code_Without_Space_Is_Valid()
        {
            // Arrange
            var validatior = new CreditCardValidator();
            var account    = BuildCreditCard(billingZip: "L4L9C8");

            // Act
            var result = validatior.Validate(account);

            // Assert
            Assert.Empty(result.Errors);
        }
예제 #4
0
        public void BillingZipcode_Is_Longer_Than_10_Characters_Returns_error()
        {
            // Arrange
            var validator = new CreditCardValidator();
            var account   = BuildCreditCard(billingZip: "12345678901");

            // Act
            var result = validator.Validate(account);

            // Assert
            Assert.True(result.Errors.Any(e => e.ErrorMessage == BillingZipcodeValidationErrorMessage));
        }
예제 #5
0
        public void NoCardInfoTest()
        {
            var mValidator  = new CreditCardValidator();
            var mCreditCard = new CreditCard();

            var mValResult = mValidator.Validate(mCreditCard);

            Assert.False(mValResult.IsValid);
            Assert.Contains(mValResult.Errors, x => x.PropertyName == "CardOwner");
            Assert.Contains(mValResult.Errors, x => x.PropertyName == "IssueDate");
            Assert.Contains(mValResult.Errors, x => x.PropertyName == "Cvc");
            Assert.Contains(mValResult.Errors, x => x.PropertyName == "CardNumber");
        }
예제 #6
0
        IEnumerable <KeyValuePair <CreditCardValidationField, string> > ValidateFields(CreditCardValidationConfiguration configuration, CreditCardValidationContext context)
        {
            var acceptedCardType = CreditCardTypeProvider
                                   .GetAcceptedCreditCardTypes()
                                   .Contains(context.CardType, StringComparer.OrdinalIgnoreCase);

            if (!acceptedCardType)
            {
                yield return(new KeyValuePair <CreditCardValidationField, string>(CreditCardValidationField.CardType, "Invalid card type"));
            }

            var missingRequiredIssueNumber =
                CreditCardTypeProvider
                .GetCardTypesRequiringIssueNumber()
                .Contains(context.CardType, StringComparer.OrdinalIgnoreCase) &&
                string.IsNullOrEmpty(context.IssueNumber);

            if (missingRequiredIssueNumber)
            {
                yield return(new KeyValuePair <CreditCardValidationField, string>(CreditCardValidationField.IssueNumber, "Please enter a card issue number"));
            }

            if (configuration.ValidateCreditCardNumber)
            {
                var cardType = CardType.Parse(context.CardType);
                if (cardType != null)                // Only validate known card types
                {
                    var creditCardValidator = new CreditCardValidator(context.Number, cardType);
                    if (!creditCardValidator.Validate())
                    {
                        yield return(new KeyValuePair <CreditCardValidationField, string>(CreditCardValidationField.Number, "Please enter a valid credit card number"));
                    }
                }
            }

            var missingExpirationDate = context.ExpirationDate == null;

            if (missingExpirationDate)
            {
                yield return(new KeyValuePair <CreditCardValidationField, string>(CreditCardValidationField.ExpirationDate, "Card expiration date is missing or invalid"));
            }

            var missingRequiredCardExtraCode =
                !configuration.CardExtraCodeIsOptional &&
                string.IsNullOrEmpty(context.Cvv);

            if (missingRequiredCardExtraCode)
            {
                yield return(new KeyValuePair <CreditCardValidationField, string>(CreditCardValidationField.Cvv, "Please enter the credit card verification code with no spaces. This number can be found printed on the back side of your card"));
            }
        }
        IEnumerable <KeyValuePair <CreditCardValidationField, string> > ValidateFields(CreditCardValidationConfiguration configuration, CreditCardValidationContext context)
        {
            var acceptedCardType = CreditCardTypeProvider
                                   .GetAcceptedCreditCardTypes()
                                   .Contains(context.CardType, StringComparer.OrdinalIgnoreCase);

            if (!acceptedCardType)
            {
                yield return(new KeyValuePair <CreditCardValidationField, string>(CreditCardValidationField.CardType, AppLogic.GetString("creditCardDetails.cardType.invalid")));
            }

            var missingRequiredIssueNumber =
                CreditCardTypeProvider
                .GetCardTypesRequiringIssueNumber()
                .Contains(context.CardType, StringComparer.OrdinalIgnoreCase) &&
                string.IsNullOrEmpty(context.IssueNumber);

            if (missingRequiredIssueNumber)
            {
                yield return(new KeyValuePair <CreditCardValidationField, string>(CreditCardValidationField.IssueNumber, AppLogic.GetString("creditCardDetails.cardIssueNumber.required")));
            }

            if (configuration.ValidateCreditCardNumber)
            {
                var cardType = CardType.Parse(context.CardType);
                if (cardType != null)                // Only validate known card types
                {
                    var creditCardValidator = new CreditCardValidator(context.Number, cardType);
                    if (!creditCardValidator.Validate())
                    {
                        yield return(new KeyValuePair <CreditCardValidationField, string>(CreditCardValidationField.Number, AppLogic.GetString("creditCardDetails.cardNumber.format")));
                    }
                }
            }

            var missingExpirationDate = context.ExpirationDate == null;

            if (missingExpirationDate)
            {
                yield return(new KeyValuePair <CreditCardValidationField, string>(CreditCardValidationField.ExpirationDate, AppLogic.GetString("creditCardDetails.cardExpirationDate.required")));
            }

            var missingRequiredCardExtraCode =
                !configuration.CardExtraCodeIsOptional &&
                string.IsNullOrEmpty(context.Cvv);

            if (missingRequiredCardExtraCode)
            {
                yield return(new KeyValuePair <CreditCardValidationField, string>(CreditCardValidationField.Cvv, AppLogic.GetString("address.cs.29")));
            }
        }
예제 #8
0
        public void CreditCardNumber_Is_15_Digits_Is_Valid()
        {
            // Arrange
            var validator = new CreditCardValidator();
            var account   = new CreditCard {
                CreditCardNumber = "371449635398456"
            };

            // Act
            var result = validator.Validate(account);

            // Assert
            Assert.False(result.Errors.Any(e => e.ErrorMessage == "CreditCardNumber is invalid"));
        }
예제 #9
0
        public void ExprirationDate_Is_In_MM_YYYY_Format_Is_Valid()
        {
            // Arrange
            var validator = new CreditCardValidator();
            var account   = new CreditCard {
                ExpirationDate = "10/2015"
            };

            // Act
            var result = validator.Validate(account);

            // Assert
            Assert.False(result.Errors.Any(e => e.ErrorMessage == "ExpirationDate must be in a \"MM/YYYY\" format"));
        }
예제 #10
0
        public void ExprirationDate_Is_Empty_Generates_Errors()
        {
            // Arrange
            var validator = new CreditCardValidator();
            var account   = new CreditCard {
                ExpirationDate = ""
            };

            // Act
            var result = validator.Validate(account);

            // Assert
            Assert.True(result.Errors.Any(e => e.ErrorMessage == "ExpirationDate must be in a \"MM/YYYY\" format"));
        }
예제 #11
0
        public void CreditCardNumber_Fifteen_Asterisk_Last_Four_Numbers_Generates_Errors()
        {
            // Arrange
            var validator = new CreditCardValidator();
            var account   = new CreditCard {
                CreditCardNumber = "***************8601"
            };

            // Act
            var result = validator.Validate(account);

            // Assert
            Assert.True(result.Errors.Any(e => e.ErrorMessage == "CreditCardNumber is invalid"));
        }
예제 #12
0
        public void CreditCardNumber_Twelve_Asterisk_Last_Three_Is_Valid()
        {
            // Arrange
            var validator = new CreditCardValidator();
            var account   = new CreditCard {
                CreditCardNumber = "************6011"
            };

            // Act
            var result = validator.Validate(account);

            // Assert
            Assert.False(result.Errors.Any(e => e.ErrorMessage == "CreditCardNumber is invalid"));
        }
예제 #13
0
        public void CreditCardNumber_New_MasterCard_bin_Digits_Is_Valid()
        {
            // Arrange
            var validator = new CreditCardValidator();
            var account   = new CreditCard {
                CreditCardNumber = "2223000048400011"
            };

            // Act
            var result = validator.Validate(account);

            // Assert
            Assert.False(result.Errors.Any(e => e.ErrorMessage == "CreditCardNumber is invalid"));
        }
예제 #14
0
        public void CreditCardNumber_Is_19_Digits_Is_Valid()
        {
            // Arrange
            var validator = new CreditCardValidator();
            var account   = new CreditCard {
                CreditCardNumber = "4916184755461012080"
            };

            // Act
            var result = validator.Validate(account);

            // Assert
            Assert.False(result.Errors.Any(e => e.ErrorMessage == "CreditCardNumber is invalid"));
        }
예제 #15
0
        public void CreditCardNumber_Is_17_Digits_Generates_Error()
        {
            // Arrange
            var validator = new CreditCardValidator();
            var account   = new CreditCard {
                CreditCardNumber = "40037366561778601"
            };

            // Act
            var result = validator.Validate(account);

            // Assert
            Assert.True(result.Errors.Any(e => e.ErrorMessage == "CreditCardNumber is invalid"));
        }
예제 #16
0
        public void CreditCardNumber_Is_Empty_Generates_Error()
        {
            // Arrange
            var validator = new CreditCardValidator();
            var account   = new CreditCard {
                CreditCardNumber = ""
            };

            // Act
            var result = validator.Validate(account);

            // Assert
            Assert.True(result.Errors.Any(e => e.ErrorMessage == "CreditCardNumber is required"));
        }
예제 #17
0
        public void NoValidAmericanExpressTest()
        {
            var mValidator = new CreditCardValidator();

            var mCreditCard = new CreditCard
            {
                CardOwner  = "Claudio Godoi",
                CardNumber = "378282246310005",
                IssueDate  = "11/2020",
                Cvc        = "123"
            };

            var mValResult = mValidator.Validate(mCreditCard);

            Assert.False(mValResult.IsValid);
        }
예제 #18
0
        public void NoValidMasterCardTest()
        {
            var mValidator = new CreditCardValidator();

            var mCreditCard = new CreditCard
            {
                CardOwner  = "Claudio Godoi",
                CardNumber = "5555555555554444",
                IssueDate  = "11/2020",
                Cvc        = "1235"
            };

            var mValResult = mValidator.Validate(mCreditCard);

            Assert.False(mValResult.IsValid);
        }
예제 #19
0
        protected void dlAddress_UpdateCommand(object sender, DataListCommandEventArgs e)
        {
            CreditCardPanel ctrlCreditCard = e.Item.FindControl("ctrlCreditCard") as CreditCardPanel;
            Panel           pnlCCData      = e.Item.FindControl("pnlCCData") as Panel;
            Panel           pnlECData      = e.Item.FindControl("pnlECData") as Panel;

            AddressControl ctrlAddress = e.Item.FindControl("ctrlAddress") as AddressControl;

            if (ctrlAddress != null)
            {
                ctrlAddress.CountryIDToValidateZipCode = AppLogic.GetCountryID(ctrlAddress.Country);
            }
            Page.Validate("EditAddress");

            if (AddressMode == AddressTypes.Billing && pnlCCData.Visible)
            {
                if (ctrlCreditCard.CreditCardType == AppLogic.GetString("address.cs.32", SkinID, ThisCustomer.LocaleSetting))
                {
                    pnlCCTypeErrorMsg.Visible = true;
                }
                else
                {
                    pnlCCTypeErrorMsg.Visible = false;
                }
                if (ctrlCreditCard.CardExpMonth == AppLogic.GetString("address.cs.34", SkinID, ThisCustomer.LocaleSetting))
                {
                    pnlCCExpMonthErrorMsg.Visible = true;
                }
                else
                {
                    pnlCCExpMonthErrorMsg.Visible = false;
                }
                if (ctrlCreditCard.CardExpYr == AppLogic.GetString("address.cs.35", 1, ThisCustomer.LocaleSetting))
                {
                    pnlCCExpYrErrorMsg.Visible = true;
                }
                else
                {
                    pnlCCExpYrErrorMsg.Visible = false;
                }

                CardType            Type      = CardType.Parse(ctrlCreditCard.CreditCardType);
                CreditCardValidator validator = new CreditCardValidator(ctrlCreditCard.CreditCardNumber, Type);
                bool isValid = validator.Validate();

                if (!isValid && AppLogic.AppConfigBool("ValidateCreditCardNumbers"))
                {
                    ctrlCreditCard.CreditCardNumber = string.Empty;
                    // clear the card extra code
                    AppLogic.StoreCardExtraCodeInSession(ThisCustomer, string.Empty);
                    pnlCCNumberErrorMsg.Visible = true;
                }
                else
                {
                    pnlCCNumberErrorMsg.Visible = false;
                }
            }

            bool isValidCCDropdown = !(pnlCCTypeErrorMsg.Visible || pnlCCExpMonthErrorMsg.Visible ||
                                       pnlCCExpYrErrorMsg.Visible || pnlCCNumberErrorMsg.Visible);

            if (dlAddress != null && Page.IsValid && isValidCCDropdown)
            {
                AspDotNetStorefrontCore.Address anyAddress = new AspDotNetStorefrontCore.Address();
                Echeck ctrlECheck = e.Item.FindControl("ctrlECheck") as Echeck;

                if (ctrlAddress != null)
                {
                    anyAddress.AddressID     = int.Parse((e.Item.FindControl("hfAddressID") as HiddenField).Value);
                    anyAddress.CustomerID    = ThisCustomer.CustomerID;
                    anyAddress.NickName      = ctrlAddress.NickName;
                    anyAddress.FirstName     = ctrlAddress.FirstName;
                    anyAddress.LastName      = ctrlAddress.LastName;
                    anyAddress.Phone         = ctrlAddress.PhoneNumber;
                    anyAddress.Company       = ctrlAddress.Company;
                    anyAddress.AddressType   = AddressMode;
                    anyAddress.ResidenceType = (ResidenceTypes)Enum.Parse(typeof(ResidenceTypes), ctrlAddress.ResidenceType, true);
                    anyAddress.Address1      = ctrlAddress.Address1;
                    anyAddress.Address2      = ctrlAddress.Address2;
                    anyAddress.City          = ctrlAddress.City;
                    anyAddress.Suite         = ctrlAddress.Suite;
                    anyAddress.Zip           = ctrlAddress.ZipCode;
                    anyAddress.Country       = ctrlAddress.Country;
                    anyAddress.State         = ctrlAddress.State;

                    if (CustomerCCRequired && AddressMode == AddressTypes.Billing)
                    {
                        Address BillingAddress = new Address();
                        BillingAddress.LoadByCustomer(ThisCustomer.CustomerID, ThisCustomer.PrimaryBillingAddressID, AddressTypes.Billing);

                        if (ctrlCreditCard != null)
                        {
                            anyAddress.CardName = ctrlCreditCard.CreditCardName;

                            if (!ctrlCreditCard.CreditCardNumber.StartsWith("*"))
                            {
                                anyAddress.CardNumber = ctrlCreditCard.CreditCardNumber;
                            }
                            else
                            {
                                anyAddress.CardNumber = BillingAddress.CardNumber;
                            }

                            anyAddress.CardType            = ctrlCreditCard.CreditCardType;
                            anyAddress.CardExpirationMonth = ctrlCreditCard.CardExpMonth;
                            anyAddress.CardExpirationYear  = ctrlCreditCard.CardExpYr;

                            if (AppLogic.AppConfigBool("ShowCardStartDateFields"))
                            {
                                string cardStartDate = "";
                                if (ctrlCreditCard.CardExpMonth != AppLogic.GetString("address.cs.34", SkinID, ThisCustomer.LocaleSetting))
                                {
                                    cardStartDate = ctrlCreditCard.CardStartMonth;
                                }
                                if (ctrlCreditCard.CardExpYr != AppLogic.GetString("address.cs.35", SkinID, ThisCustomer.LocaleSetting))
                                {
                                    cardStartDate += ctrlCreditCard.CardStartYear;
                                }
                                anyAddress.CardStartDate = cardStartDate;
                            }
                            if (AppLogic.AppConfigBool("CardExtraCodeIsOptional"))
                            {
                                anyAddress.CardIssueNumber = ctrlCreditCard.CreditCardIssueNumber;
                            }
                        }

                        if (ShowEcheck && ctrlECheck != null)
                        {
                            anyAddress.ECheckBankAccountName = ctrlECheck.ECheckBankAccountName;
                            anyAddress.ECheckBankName        = ctrlECheck.ECheckBankName;

                            if (!ctrlECheck.ECheckBankABACode.StartsWith("*"))
                            {
                                anyAddress.ECheckBankABACode = ctrlECheck.ECheckBankABACode;
                            }
                            else
                            {
                                anyAddress.ECheckBankABACode = BillingAddress.ECheckBankABACode;
                            }

                            if (!ctrlECheck.ECheckBankAccountNumber.StartsWith("*"))
                            {
                                anyAddress.ECheckBankAccountNumber = ctrlECheck.ECheckBankAccountNumber;
                            }
                            else
                            {
                                anyAddress.ECheckBankAccountNumber = BillingAddress.ECheckBankAccountNumber;
                            }

                            anyAddress.ECheckBankAccountType = ctrlECheck.ECheckBankAccountType;
                        }

                        if (pnlCCData.Visible)
                        {
                            anyAddress.PaymentMethodLastUsed = AppLogic.ro_PMCreditCard;
                        }
                        else if (pnlECData.Visible)
                        {
                            anyAddress.PaymentMethodLastUsed = AppLogic.ro_PMECheck;
                        }
                        else
                        {
                            anyAddress.PaymentMethodLastUsed = BillingAddress.PaymentMethodLastUsed;
                        }
                    }

                    anyAddress.UpdateDB();

                    if (AppLogic.AppConfig("VerifyAddressesProvider") != "")
                    {
                        AspDotNetStorefrontCore.Address standardizedAddress = new AspDotNetStorefrontCore.Address();
                        string validateResult = AddressValidation.RunValidate(anyAddress, out standardizedAddress);
                        anyAddress = standardizedAddress;
                        anyAddress.UpdateDB();

                        if (validateResult != AppLogic.ro_OK)
                        {
                        }
                    }

                    dlAddress.EditItemIndex = -1;
                    LoadData();
                }
            }
        }
예제 #20
0
파일: Manual.cs 프로젝트: lulzzz/BrandStore
        public override string ProcessCard(int OrderNumber, int CustomerID, Decimal OrderTotal, bool useLiveTransactions, TransactionModeEnum TransactionMode, Address UseBillingAddress, String CardExtraCode, Address UseShippingAddress, String CAVV, String ECI, String XID, out String AVSResult, out String AuthorizationResult, out String AuthorizationCode, out String AuthorizationTransID, out String TransactionCommandOut, out String TransactionResponse)
        {
            String result = AppLogic.ro_OK;

            AVSResult             = string.Empty;
            AuthorizationResult   = string.Empty;
            AuthorizationCode     = string.Empty;
            AuthorizationTransID  = string.Empty;
            TransactionCommandOut = string.Empty;
            TransactionResponse   = string.Empty;

            if (AppLogic.AppConfigBool("ValidateCreditCardNumbers"))
            {
                CardType cardType = CardType.ParseFromNumber(UseBillingAddress.CardNumber.ToString());
                if (cardType == null)
                {
                    return(AppLogic.GetString("checkoutcard_process.aspx.3", Customer.Current.LocaleSetting));
                }

                CreditCardValidator validator = new CreditCardValidator(UseBillingAddress.CardNumber.ToString(), cardType);

                bool isValidCC = validator.Validate();
                if (!isValidCC)
                {
                    return(AppLogic.GetString("checkoutcard_process.aspx.3", Customer.Current.LocaleSetting));
                }

                bool isValidCCExpiration = validator.CheckCCExpiration(Convert.ToInt32(UseBillingAddress.CardExpirationMonth), Convert.ToInt32(UseBillingAddress.CardExpirationYear));
                if (!isValidCCExpiration)
                {
                    return(AppLogic.GetString("checkoutcard_process.aspx.6", Customer.Current.LocaleSetting));
                }

                bool isValidCVV = AppLogic.AppConfigBool("CardExtraCodeIsOptional") || validator.ValidateCVV(UseBillingAddress.CardNumber.ToString(), CardExtraCode);
                if (!isValidCVV)
                {
                    return(AppLogic.GetString("checkoutcard_process.aspx.7", Customer.Current.LocaleSetting));
                }
            }

            StringBuilder transactionCommand = new StringBuilder(4096);

            transactionCommand.Append("x_type=" + CommonLogic.IIF(TransactionMode == TransactionModeEnum.auth, "AUTH_ONLY", "AUTH_CAPTURE"));

            transactionCommand.Append("&x_test_request=" + CommonLogic.IIF(useLiveTransactions, "FALSE", "TRUE"));
            transactionCommand.Append("&x_description=" + HttpContext.Current.Server.UrlEncode(AppLogic.AppConfig("StoreName") + " Order " + OrderNumber.ToString()));

            transactionCommand.Append("&x_amount=" + Localization.CurrencyStringForGatewayWithoutExchangeRate(OrderTotal));
            transactionCommand.Append("&x_card_num=" + UseBillingAddress.CardNumber);
            if (CardExtraCode.Length != 0)
            {
                transactionCommand.Append("&x_card_code=" + CardExtraCode.Trim());
            }

            transactionCommand.Append("&x_exp_date=" + UseBillingAddress.CardExpirationMonth.PadLeft(2, '0') + "/" + UseBillingAddress.CardExpirationYear);
            transactionCommand.Append("&x_phone=" + HttpContext.Current.Server.UrlEncode(UseBillingAddress.Phone));
            transactionCommand.Append("&x_fax=");
            transactionCommand.Append("&x_customer_tax_id=");
            transactionCommand.Append("&x_cust_id=" + CustomerID.ToString());
            transactionCommand.Append("&x_invoice_num=" + OrderNumber.ToString());
            transactionCommand.Append("&x_email=" + HttpContext.Current.Server.UrlEncode(UseBillingAddress.EMail));
            transactionCommand.Append("&x_customer_ip=" + CommonLogic.CustomerIpAddress());

            transactionCommand.Append("&x_first_name=" + HttpContext.Current.Server.UrlEncode(UseBillingAddress.FirstName));
            transactionCommand.Append("&x_last_name=" + HttpContext.Current.Server.UrlEncode(UseBillingAddress.LastName));
            transactionCommand.Append("&x_company=" + HttpContext.Current.Server.UrlEncode(UseBillingAddress.Company));
            transactionCommand.Append("&x_address=" + HttpContext.Current.Server.UrlEncode(UseBillingAddress.Address1));
            transactionCommand.Append("&x_city=" + HttpContext.Current.Server.UrlEncode(UseBillingAddress.City));
            transactionCommand.Append("&x_state=" + HttpContext.Current.Server.UrlEncode(UseBillingAddress.State));
            transactionCommand.Append("&x_zip=" + HttpContext.Current.Server.UrlEncode(UseBillingAddress.Zip));
            transactionCommand.Append("&x_country=" + HttpContext.Current.Server.UrlEncode(UseBillingAddress.Country));

            if (UseShippingAddress != null)
            {
                transactionCommand.Append("&x_ship_to_first_name=" + HttpContext.Current.Server.UrlEncode(UseShippingAddress.FirstName));
                transactionCommand.Append("&x_ship_to_last_name=" + HttpContext.Current.Server.UrlEncode(UseShippingAddress.LastName));
                transactionCommand.Append("&x_ship_to_company=" + HttpContext.Current.Server.UrlEncode(UseShippingAddress.Company));
                transactionCommand.Append("&x_ship_to_address=" + HttpContext.Current.Server.UrlEncode(UseShippingAddress.Address1));
                transactionCommand.Append("&x_ship_to_city=" + HttpContext.Current.Server.UrlEncode(UseShippingAddress.City));
                transactionCommand.Append("&x_ship_to_state=" + HttpContext.Current.Server.UrlEncode(UseShippingAddress.State));
                transactionCommand.Append("&x_ship_to_zip=" + HttpContext.Current.Server.UrlEncode(UseShippingAddress.Zip));
                transactionCommand.Append("&x_ship_to_country=" + HttpContext.Current.Server.UrlEncode(UseShippingAddress.Country));
            }

            transactionCommand.Append("&x_customer_ip=" + CommonLogic.CustomerIpAddress());

            if (CAVV.Length != 0 || ECI.Length != 0)
            {
                transactionCommand.Append("&x_authentication_indicator=" + ECI);
                transactionCommand.Append("&x_cardholder_authentication_value=" + CAVV);
            }

            String rawResponseString = "MANUAL GATEWAY SAID OK";

            AuthorizationCode     = "0";
            AuthorizationResult   = rawResponseString;
            AuthorizationTransID  = CommonLogic.GetNewGUID();
            AVSResult             = AppLogic.ro_OK;
            TransactionCommandOut = transactionCommand.ToString();
            TransactionResponse   = String.Empty;

            return(result);
        }