public override void GetPaymentInfo(SerializedOrderHolder holder)
        {
            ServiceProvider.SubmitOrderBTSvc.Payment payment = holder.BTOrder.Payments[0];
            var    orderPayment = (holder.Order as Order_V01).Payments[0] as CreditPayment_V01;
            string theCardType  = PostedValues[TheCardType];

            switch (theCardType)
            {
            case Visa:
            {
                CardType = IssuerAssociationType.Visa;
                break;
            }

            case MasterCard:
            {
                CardType = IssuerAssociationType.MasterCard;
                break;
            }

            case AmericanExpress:
            {
                CardType = IssuerAssociationType.AmericanExpress;
                break;
            }

            case Naranja:
            {
                CardType = IssuerAssociationType.TarjetaNaranja;
                break;
            }

            default:
            {
                if (theCardType.StartsWith(MasterCard, StringComparison.CurrentCultureIgnoreCase))
                {
                    CardType = IssuerAssociationType.MasterCard;
                }
                break;
            }
            }
            payment.PaymentCode = CreditCard.CardTypeToHPSCardType(CardType);
            orderPayment.Card.IssuerAssociation = CreditCard.GetCardType(payment.PaymentCode);
        }
        public override void GetPaymentInfo(SerializedOrderHolder holder)
        {
            ServiceProvider.SubmitOrderBTSvc.Payment payment = holder.BTOrder.Payments[0];
            CreditPayment_V01 orderPayment      = (holder.Order as Order_V01).Payments[0] as CreditPayment_V01;
            List <string>     PaymentGatewayLog = OrderProvider.GetPaymentGatewayLog(OrderNumber, PaymentGatewayLogEntryType.Response);
            string            theOne            = PaymentGatewayLog.Find(i => i.Contains(CardNum));

            if (!string.IsNullOrEmpty(theOne))
            {
                NameValueCollection theResponse = GetRequestVariables(theOne);
                // Card Number
                if (!string.IsNullOrEmpty(theResponse[CardNum]))
                {
                    CardNumber = theResponse[CardNum];
                }
                // Authorization Code
                if (!string.IsNullOrEmpty(theResponse[AuthCode]))
                {
                    base.AuthorizationCode = theResponse[AuthCode];
                }
                base.GetPaymentInfo(holder);

                //WebPay Amount
                if (!string.IsNullOrEmpty(theResponse[Amount]))
                {
                    payment.Amount = Int32.Parse(theResponse[Amount]);
                }
                orderPayment.Amount = payment.Amount;


                // Number of Installments
                PaymentOptions_V01 options = new PaymentOptions_V01();
                if (!string.IsNullOrEmpty(theResponse[InstallmentNumber]))
                {
                    options.NumberOfInstallments = Int32.Parse(theResponse[InstallmentNumber]);
                }
                else
                {
                    options.NumberOfInstallments = 1;
                }
                payment.NumberOfInstallments = options.NumberOfInstallments;
                orderPayment.PaymentOptions  = options;

                // Installment Type is Card Type (VN for credit card, VD for debit card); borrow the Auth Merchant field to place the data to display on the page
                if (!string.IsNullOrEmpty(theResponse[InstallmentType]))
                {
                    payment.AuthMerchant = theResponse[InstallmentType];
                    switch (theResponse[InstallmentType].ToString().ToUpper())
                    {
                    case "VN":
                        CardType = IssuerAssociationType.Visa;
                        break;

                    case "VD":
                        CardType = IssuerAssociationType.GenericDebitCard;
                        break;

                    default:
                        CardType = IssuerAssociationType.Visa;
                        break;
                    }
                }
                orderPayment.AuthorizationMerchantAccount = payment.AuthMerchant;
            }
        }