/*public void addGift(Guid constituentId)
         * {
         *        DataFormLoadRequest request = RecurringGiftAddForm.CreateLoadRequest(this.API.AppFxWebServiceProvider);
         *        request.FormID = new Guid("47a3c222-5e99-44a2-a5ce-5989d18f5a13");
         *        RecurringGiftAddFormData data = RecurringGiftAddForm.LoadData(this.API.AppFxWebServiceProvider, request);
         *
         *        data.AMOUNT =  Convert.ToDecimal(this.txtPaymentAmount.Text);
         *        data.CONSTITUENTID = constituentId;
         *        data.CARDHOLDERNAME = this.txtCcName.Text;
         *        data.CREDITCARDNUMBER = this.txtCcNumber.Text;
         *        data.CREDITTYPECODEID = Utility.GetCrmCC(this.cmbCcType.SelectedValue);
         *        data.EXPIRESON = new Blackbaud.AppFx.FuzzyDate(Convert.ToInt32(this.cmbCcExpYear.SelectedValue), Convert.ToInt32(this.cmbCcExpMonth.SelectedValue));
         *        data.DATE = DateTime.Now;
         *        data.STARTDATE = DateTime.Now;
         *        data.SPLITS = new RecurringGiftAddFormData.SPLITS_DATAITEM[1];
         *        data.SPLITS[0] = new RecurringGiftAddFormData.SPLITS_DATAITEM();
         *        data.SPLITS[0].AMOUNT = Convert.ToDecimal(this.txtPaymentAmount.Text);
         *        data.SPLITS[0].DESIGNATIONID = new Guid("1B2EB1A9-2FC3-4AD1-A28C-2920799C3FDF");
         *
         *        data.Save(this.API.AppFxWebServiceProvider);
         * }
         */

        /// <summary>
        /// This is where the credit card is charged
        /// </summary>
        /// <returns>Authorization Code or "Success-NoAuthCode" if transaction was successful, but no authorization code was returned</returns>
        private string ProcessPayment()
        {
            if (_paymentAmount <= 0)
            {
                throw new Exception("Payment Amount cannot be zero or negative");
            }

            BBPSPaymentInfo payment = new BBPSPaymentInfo();

            //chriswh 6/20/2013
            //bug fix to stop the creation of the donation batch
            //since it is already being written directly to the system
            payment.SkipCreateGiftTransaction = true;

            payment.DemoMode           = Options.DemoMode;
            payment.MerchantAcctID     = Options.MerchantAccountID;
            payment.Bbpid              = Utility.GetBbbid(Options.MerchantAccountID, this.API.Transactions.MerchantAccounts);
            payment.SkipCardValidation = Options.DemoMode;

            payment.AddDesignationInfo(_paymentAmount, "BBIS Reversal Child Sponsorship Payment Transaction", Options.DesignationBBNCID);

            payment.AppealID = 1;
            payment.Comments = "";

            payment.PaymentMethod             = BBNCExtensions.API.Transactions.PaymentArgs.ePaymentMethod.CreditCard;
            payment.CreditCardCSC             = this.txtCcSecurityCode.Text;
            payment.CreditCardExpirationMonth = Convert.ToInt32(this.cmbCcExpMonth.SelectedValue);
            payment.CreditCardExpirationYear  = Convert.ToInt32(this.cmbCcExpYear.SelectedValue);
            payment.CreditCardHolderName      = this.txtCcName.Text;
            payment.CreditCardNumber          = this.txtCcNumber.Text;    //VIOLATION of PCI Compliance - as a developer we can by no means ever write code that consumes someones credit card number
            payment.CreditCardType            = (BBNCExtensions.Interfaces.Services.CreditCardType)Enum.Parse(typeof(BBNCExtensions.Interfaces.Services.CreditCardType), this.cmbCcType.SelectedValue);

            payment.DonorStreetAddress = this.txtAddress.Text;
            payment.DonorCity          = this.txtCity.Text;
            payment.DonorStateProvince = this.cmbCountry.SelectedValue == "US" ? this.cmbState.SelectedValue : this.txtRegion.Text;
            payment.DonorZIP           = this.txtZip.Text;

            payment.EmailAddress = this.txtEmail.Text;

            BBNCExtensions.API.Transactions.Donations.RecordDonationReply reply = this.API.Transactions.RecordDonation(payment.GeneratePaymentArgs());


            if (!payment.InterpretPaymentReply(reply).Success)
            {
                this.lblError.Visible = true;
                this.lblError.Text    = payment.InterpretPaymentReply(reply).Message;
                return("");
            }
            else
            {
                if ((reply.CreditCardAuthorizationResponse == null) || (reply.CreditCardAuthorizationResponse.AUTHCODE == ""))
                {
                    return("Success-NoAuthCode");
                }
                else
                {
                    return(reply.CreditCardAuthorizationResponse.AUTHCODE);
                }
            }
        }
Ejemplo n.º 2
0
        private bool processPayment()
        {
            MyFinancialCommitmentsOptions2 options = (MyFinancialCommitmentsOptions2)this.Content.GetContent(typeof(MyFinancialCommitmentsOptions2));

            BBPSPaymentInfo payment = new BBPSPaymentInfo();

            payment.DemoMode           = options.DemoMode;
            payment.MerchantAcctID     = options.MerchantAccountID;
            payment.Bbpid              = Utility.GetBbbid(options.MerchantAccountID, this.API.Transactions.MerchantAccounts);
            payment.SkipCardValidation = options.DemoMode;

            int designationId = Utility.GetBbncDesignationId(Convert.ToString(ViewState["GiftId"]));

            payment.AddDesignationInfo(Convert.ToDecimal(this.txtAmount.Text), "BBIS Child Sponsorship Transaction", designationId);
            payment.AppealID = 1;
            payment.Comments = "";

            payment.PaymentMethod             = BBNCExtensions.API.Transactions.PaymentArgs.ePaymentMethod.CreditCard;
            payment.CreditCardCSC             = this.txtCcSecurityCode.Text;
            payment.CreditCardExpirationMonth = Convert.ToInt32(this.cmbCcExpMonth.SelectedValue);
            payment.CreditCardExpirationYear  = Convert.ToInt32(this.cmbCcExpYear.SelectedValue);
            payment.CreditCardHolderName      = this.txtCcName.Text;
            payment.CreditCardNumber          = this.txtCcNumber.Text; //VIOLATION of PCI Compliance - as a developer we can by no means ever write code that consumes someones credit card number
            payment.CreditCardType            = (BBNCExtensions.Interfaces.Services.CreditCardType)Enum.Parse(typeof(BBNCExtensions.Interfaces.Services.CreditCardType), this.cmbCcType.SelectedValue);

            payment.DonorStreetAddress = this.txtBillingAddress.Text;
            payment.DonorCity          = this.txtBillingCity.Text;
            payment.DonorStateProvince = this.cmbBillingCountry.SelectedValue == "US" ? this.cmbBillingState.SelectedValue : this.txtBillingRegion.Text;
            payment.DonorZIP           = this.txtBillingZip.Text;

            BBNCExtensions.API.Transactions.Donations.RecordDonationReply reply = this.API.Transactions.RecordDonation(payment.GeneratePaymentArgs());

            this.lblSummary.Text = "Payment of " + Convert.ToDecimal(this.txtAmount.Text).ToString("c") + " accepted.";

            if (!payment.InterpretPaymentReply(reply).Success)
            {
                this.lblError.Visible = true;
                this.lblError.Text    = payment.InterpretPaymentReply(reply).Message;
                return(false);
            }
            else
            {
                return(true);
            }
        }
        // Not used
        //public void addGift(Guid constituentId)
        //{
        //    DataFormLoadRequest request = RecurringGiftAddForm.CreateLoadRequest(this.API.AppFxWebServiceProvider);
        //    request.FormID = new Guid("47a3c222-5e99-44a2-a5ce-5989d18f5a13");
        //    RecurringGiftAddFormData data = RecurringGiftAddForm.LoadData(this.API.AppFxWebServiceProvider, request);

        //    data.AMOUNT = this.total;
        //    data.CONSTITUENTID = constituentId;
        //    data.CARDHOLDERNAME = this.txtCcName.Text;
        //    data.CREDITCARDNUMBER = this.txtCcNumber.Text;
        //    data.CREDITTYPECODEID = Utility.GetCrmCC(this.cmbCcType.SelectedValue);
        //    data.EXPIRESON = new Blackbaud.AppFx.FuzzyDate(Convert.ToInt32(this.cmbCcExpYear.SelectedValue), Convert.ToInt32(this.cmbCcExpMonth.SelectedValue));
        //    data.DATE = DateTime.Now;
        //    data.STARTDATE = DateTime.Now;
        //    data.SPLITS = new RecurringGiftAddFormData.SPLITS_DATAITEM[1];
        //    data.SPLITS[0] = new RecurringGiftAddFormData.SPLITS_DATAITEM();
        //    data.SPLITS[0].AMOUNT = this.total;
        //    data.SPLITS[0].DESIGNATIONID = new Guid("1B2EB1A9-2FC3-4AD1-A28C-2920799C3FDF");

        //    data.Save(this.API.AppFxWebServiceProvider);
        //}

        private bool processPayment()
        {
            // CSM - This method should only be called when making a one time gift.
            //		 This needs to be changed to use the same processing as the sponsorship payment part instead of going into the web donation batch, since it can't link it to the specific recurring gift

            // SponsorshipPaymentFormOptionsOCM2 options = (SponsorshipPaymentFormOptionsOCM2)this.Content.GetContent(typeof(SponsorshipPaymentFormOptionsOCM2));

            BBPSPaymentInfo payment = new BBPSPaymentInfo();

            //payment.DemoMode = MyContent.DemoMode;
            //payment.MerchantAcctID = 14;
            //payment.Bbpid = Utility.GetBbbid(14, this.API.Transactions.MerchantAccounts);
            //payment.SkipCardValidation = false;

            payment.DemoMode           = MyContent.DemoMode;
            payment.MerchantAcctID     = MyContent.MerchantAccountID;
            payment.Bbpid              = Utility.GetBbbid(MyContent.MerchantAccountID, this.API.Transactions.MerchantAccounts);
            payment.SkipCardValidation = MyContent.DemoMode;

            foreach (DataRow dr in this.cartData.Rows)
            {
                int     designationId = Utility.GetBbncDesignationIdFromSponsorshipOpportunity(dr["Id"].ToString());
                decimal amount        = Convert.ToInt32(dr["Months"]) * Convert.ToDecimal(dr["Amount"]);

                payment.AddDesignationInfo(amount, "BBIS Child Sponsorship Transaction", designationId);
            }

            payment.AppealID = 1;
            payment.Comments = "";

            //if (this.radPayment.SelectedValue == "Check")
            //{
            //    // CSM - Since this method is only called when a person makes a one time credit card payment, it should never get here.
            //    payment.PaymentMethod = BBNCExtensions.API.Transactions.PaymentArgs.ePaymentMethod.Check;
            //}
            //else
            //{
            payment.PaymentMethod = BBNCExtensions.API.Transactions.PaymentArgs.ePaymentMethod.CreditCard;

            payment.CreditCardCSC             = this.txtCcSecurityCode.Text;
            payment.CreditCardExpirationMonth = Convert.ToInt32(this.cmbCcExpMonth.SelectedValue);
            payment.CreditCardExpirationYear  = Convert.ToInt32(this.cmbCcExpYear.SelectedValue);
            payment.CreditCardHolderName      = this.txtCcName.Text;
            payment.CreditCardNumber          = this.txtCcNumber.Text;
            payment.CreditCardType            = (BBNCExtensions.Interfaces.Services.CreditCardType)Enum.Parse(typeof(BBNCExtensions.Interfaces.Services.CreditCardType), this.cmbCcType.SelectedValue);

            if (this.radBilling.SelectedValue == "Yes")
            {
                payment.DonorStreetAddress = this.txtAddress.Text;
                payment.DonorCity          = this.txtCity.Text;
                payment.DonorZIP           = this.txtZip.Text;
            }
            else
            {
                payment.DonorStreetAddress = this.txtBillingAddress.Text;
                payment.DonorCity          = this.txtBillingCity.Text;
                payment.DonorZIP           = this.txtBillingZip.Text;
            }

            //}

            payment.EmailAddress = this.txtEmail.Text;
            BBNCExtensions.API.Transactions.Donations.RecordDonationReply reply = this.API.Transactions.RecordDonation(payment.GeneratePaymentArgs());
            if (!payment.InterpretPaymentReply(reply).Success)
            {
                this.lblError.Visible = true;
                this.lblError.Text    = payment.InterpretPaymentReply(reply).Message;
                return(false);
            }
            else
            {
                return(true);
            }
        }
Ejemplo n.º 4
0
        private bool processPayment()
        {
            var opts = MyContent;

            BBPSPaymentInfo payment = new BBPSPaymentInfo();

            payment.SkipCreateGiftTransaction = true;
            payment.DemoMode           = opts.DemoMode;
            payment.MerchantAcctID     = opts.MerchantAccountID;
            payment.Bbpid              = Utility.GetBbbid(opts.MerchantAccountID, this.API.Transactions.MerchantAccounts);
            payment.SkipCardValidation = MyContent.DemoMode;
            payment.AppealID           = 1;
            payment.Comments           = "";

            List <string> giftsToProcess = new List <string>();

            if (ViewState["selectedSponsorships"] != null)
            {
                giftsToProcess = ViewState["selectedSponsorships"] as List <string>;
            }
            else
            {
                giftsToProcess.Add(ViewState["GiftId"].ToString());
            }

            decimal enteredAmount = Convert.ToDecimal(this.txtAmount.Text);
            decimal amount        = enteredAmount / (giftsToProcess.Count.Equals(0) ? 1 : giftsToProcess.Count);
            decimal runningTotal  = 0;

            amount = Math.Round(amount, 2);

            for (int i = 0; i < giftsToProcess.Count; i++)
            {
                if (i + 1 == giftsToProcess.Count)
                {
                    if (runningTotal + amount != enteredAmount)
                    {
                        amount = enteredAmount - runningTotal;
                    }
                }

                int designationId = Utility.GetBbncDesignationId(giftsToProcess[i]);
                payment.AddDesignationInfo(amount, "BBIS Child Sponsorship Transaction", designationId);
            }

            if (this.radPayment.SelectedValue == "Check")
            {
                payment.PaymentMethod = BBNCExtensions.API.Transactions.PaymentArgs.ePaymentMethod.Check;
            }
            else
            {
                payment.PaymentMethod             = BBNCExtensions.API.Transactions.PaymentArgs.ePaymentMethod.CreditCard;
                payment.CreditCardCSC             = this.txtCcSecurityCode.Text;
                payment.CreditCardExpirationMonth = Convert.ToInt32(this.cmbCcExpMonth.SelectedValue);
                payment.CreditCardExpirationYear  = Convert.ToInt32(this.cmbCcExpYear.SelectedValue);
                payment.CreditCardHolderName      = this.txtCcName.Text;
                payment.CreditCardNumber          = this.txtCcNumber.Text; //VIOLATION of PCI Compliance - as a developer we can by no means ever write code that consumes someones credit card number
                payment.CreditCardType            = (BBNCExtensions.Interfaces.Services.CreditCardType)Enum.Parse(typeof(BBNCExtensions.Interfaces.Services.CreditCardType), this.cmbCcType.SelectedValue);
                payment.DonorStreetAddress        = this.txtBillingAddress.Text;
                payment.DonorCity          = this.txtBillingCity.Text;
                payment.DonorStateProvince = this.cmbBillingCountry.SelectedValue == "US" ? this.cmbBillingState.SelectedValue : this.txtBillingRegion.Text;
                payment.DonorZIP           = this.txtBillingZip.Text;
            }

            BBNCExtensions.API.Transactions.Donations.RecordDonationReply reply = this.API.Transactions.RecordDonation(payment.GeneratePaymentArgs());

            if (!payment.InterpretPaymentReply(reply).Success)
            {
                this.lblError.Visible = true;
                this.lblError.Text    = payment.InterpretPaymentReply(reply).Message;
                return(false);
            }
            else
            {
                return(true);
            }
        }
Ejemplo n.º 5
0
        private bool processPayment()
        {
            BBPSPaymentInfo payment = new BBPSPaymentInfo();

            //chriswh 6/20/2013
            //bug fix to stop the creation of the donation batch
            //since it is already being written directly to the system
            payment.SkipCreateGiftTransaction = true;

            payment.DemoMode           = MyContent.DemoMode;
            payment.MerchantAcctID     = MyContent.MerchantAccountID;
            payment.Bbpid              = Utility.GetBbbid(MyContent.MerchantAccountID, this.API.Transactions.MerchantAccounts);
            payment.SkipCardValidation = MyContent.DemoMode;

            foreach (DataRow dr in this.CartData.Rows)
            {
                int     designationId = Utility.GetBbncDesignationIdFromSponsorshipOpportunity(dr["Id"].ToString());
                decimal amount        = Convert.ToInt32(dr["Months"]) * Convert.ToDecimal(dr["Amount"]);

                payment.AddDesignationInfo(amount, "BBIS Child Sponsorship Transaction", designationId);
            }

            payment.AppealID = 1;
            payment.Comments = "";

            if (this.radPayment.SelectedValue == "Check")
            {
                payment.PaymentMethod = BBNCExtensions.API.Transactions.PaymentArgs.ePaymentMethod.Check;
            }
            else
            {
                payment.PaymentMethod             = BBNCExtensions.API.Transactions.PaymentArgs.ePaymentMethod.CreditCard;
                payment.CreditCardCSC             = this.txtCcSecurityCode.Text;
                payment.CreditCardExpirationMonth = Convert.ToInt32(this.cmbCcExpMonth.SelectedValue);
                payment.CreditCardExpirationYear  = Convert.ToInt32(this.cmbCcExpYear.SelectedValue);
                payment.CreditCardHolderName      = this.txtCcName.Text;
                payment.CreditCardNumber          = this.txtCcNumber.Text; //VIOLATION of PCI Compliance - as a developer we can by no means ever write code that consumes someones credit card number
                payment.CreditCardType            = (BBNCExtensions.Interfaces.Services.CreditCardType)Enum.Parse(typeof(BBNCExtensions.Interfaces.Services.CreditCardType), this.cmbCcType.SelectedValue);

                if (this.radBilling.SelectedValue == "Yes")
                {
                    payment.DonorStreetAddress = this.txtAddress.Text;
                    payment.DonorCity          = this.txtCity.Text;
                    payment.DonorStateProvince = this.cmbCountry.SelectedValue == "US" ? this.cmbState.SelectedValue : this.txtRegion.Text;
                    payment.DonorZIP           = this.txtZip.Text;
                }
                else
                {
                    payment.DonorStreetAddress = this.txtBillingAddress.Text;
                    payment.DonorCity          = this.txtBillingCity.Text;
                    payment.DonorStateProvince = this.cmbCountry.SelectedValue == "US" ? this.cmbBillingState.SelectedValue : this.txtBillingRegion.Text;
                    payment.DonorZIP           = this.txtBillingZip.Text;
                }
            }

            payment.EmailAddress = this.txtEmail.Text;

            BBNCExtensions.API.Transactions.Donations.RecordDonationReply reply = this.API.Transactions.RecordDonation(payment.GeneratePaymentArgs());

            if (!payment.InterpretPaymentReply(reply).Success)
            {
                this.lblError.Visible = true;
                this.lblError.Text    = payment.InterpretPaymentReply(reply).Message;
                return(false);
            }
            else
            {
                return(true);
            }
        }
Ejemplo n.º 6
0
        private bool processPayment()
        {
            SponsorshipPaymentFormOptionsOCM options = (SponsorshipPaymentFormOptionsOCM)this.Content.GetContent(typeof(SponsorshipPaymentFormOptionsOCM));

            BBPSPaymentInfo payment = new BBPSPaymentInfo();

            payment.DemoMode           = options.DemoMode;
            payment.MerchantAcctID     = 14;
            payment.Bbpid              = Utility.GetBbbid(14, this.API.Transactions.MerchantAccounts);
            payment.SkipCardValidation = false;
            foreach (DataRow dr in this.cartData.Rows)
            {
                int     designationId = Utility.GetBbncDesignationIdFromSponsorshipOpportunity(dr["Id"].ToString());
                decimal amount        = Convert.ToInt32(dr["Months"]) * Convert.ToDecimal(dr["Amount"]);

                payment.AddDesignationInfo(amount, "BBIS Child Sponsorship Transaction", designationId);
            }

            payment.AppealID = 1;
            payment.Comments = "";
            if (this.radPayment.SelectedValue == "Check")
            {
                payment.PaymentMethod = BBNCExtensions.API.Transactions.PaymentArgs.ePaymentMethod.Check;
            }
            else
            {
                payment.PaymentMethod = BBNCExtensions.API.Transactions.PaymentArgs.ePaymentMethod.CreditCard;

                payment.CreditCardCSC             = this.txtCcSecurityCode.Text;
                payment.CreditCardExpirationMonth = Convert.ToInt32(this.cmbCcExpMonth.SelectedValue);
                payment.CreditCardExpirationYear  = Convert.ToInt32(this.cmbCcExpYear.SelectedValue);
                payment.CreditCardHolderName      = this.txtCcName.Text;
                payment.CreditCardNumber          = this.txtCcNumber.Text;
                payment.CreditCardType            = (BBNCExtensions.Interfaces.Services.CreditCardType)Enum.Parse(typeof(BBNCExtensions.Interfaces.Services.CreditCardType), this.cmbCcType.SelectedValue);

                if (this.radBilling.SelectedValue == "Yes")
                {
                    payment.DonorStreetAddress = this.txtAddress.Text;
                    payment.DonorCity          = this.txtCity.Text;
                    payment.DonorStateProvince = this.cmbCountry.SelectedValue == "US" ? this.cmbState.SelectedValue : this.txtRegion.Text;
                    payment.DonorZIP           = this.txtZip.Text;
                }
                else
                {
                    payment.DonorStreetAddress = this.txtBillingAddress.Text;
                    payment.DonorCity          = this.txtBillingCity.Text;
                    payment.DonorStateProvince = this.cmbCountry.SelectedValue == "US" ? this.cmbBillingState.SelectedValue : this.txtBillingRegion.Text;
                    payment.DonorZIP           = this.txtBillingZip.Text;
                }
            }

            payment.EmailAddress = this.txtEmail.Text;
            BBNCExtensions.API.Transactions.Donations.RecordDonationReply reply = this.API.Transactions.RecordDonation(payment.GeneratePaymentArgs());
            if (!payment.InterpretPaymentReply(reply).Success)
            {
                this.lblError.Visible = true;
                this.lblError.Text    = payment.InterpretPaymentReply(reply).Message;
                return(false);
            }
            else
            {
                return(true);
            }
        }
        private bool processPayment()
        {
            MySponsorshipsOptions2 options = (MySponsorshipsOptions2)this.Content.GetContent(typeof(MySponsorshipsOptions2));

            BBPSPaymentInfo payment = new BBPSPaymentInfo();

            payment.DemoMode           = options.DemoMode;
            payment.MerchantAcctID     = 14;
            payment.Bbpid              = Utility.GetBbbid(14, this.API.Transactions.MerchantAccounts);
            payment.SkipCardValidation = false;
            payment.AppealID           = 1;
            payment.Comments           = "";

            List <string> giftsToProcess = new List <string>();

            if (ViewState["selectedSponsorships"] != null)
            {
                giftsToProcess = ViewState["selectedSponsorships"] as List <string>;
            }
            else
            {
                giftsToProcess.Add(ViewState["GiftId"].ToString());
            }

            decimal enteredAmount = Convert.ToDecimal(this.txtAmount.Text);
            decimal amount        = enteredAmount / giftsToProcess.Count;
            decimal runningTotal  = 0;

            amount = Math.Round(amount, 2);

            for (int i = 0; i < giftsToProcess.Count; i++)
            {
                if (i + 1 == giftsToProcess.Count)
                {
                    if (runningTotal + amount != enteredAmount)
                    {
                        amount = enteredAmount - runningTotal;
                    }
                }

                int designationId = Utility.GetBbncDesignationId(giftsToProcess[i]);
                payment.AddDesignationInfo(amount, "BBIS Child Sponsorship Transaction", designationId);
            }

            payment.PaymentMethod             = BBNCExtensions.API.Transactions.PaymentArgs.ePaymentMethod.CreditCard;
            payment.CreditCardCSC             = this.txtCcSecurityCode.Text;
            payment.CreditCardExpirationMonth = Convert.ToInt32(this.cmbCcExpMonth.SelectedValue);
            payment.CreditCardExpirationYear  = Convert.ToInt32(this.cmbCcExpYear.SelectedValue);
            payment.CreditCardHolderName      = this.txtCcName.Text;
            payment.CreditCardNumber          = this.txtCcNumber.Text;
            payment.CreditCardType            = (BBNCExtensions.Interfaces.Services.CreditCardType)Enum.Parse(typeof(BBNCExtensions.Interfaces.Services.CreditCardType), this.cmbCcType.SelectedValue);

            payment.DonorStreetAddress = this.txtBillingAddress.Text;
            payment.DonorCity          = this.txtBillingCity.Text;
            payment.DonorStateProvince = this.cmbBillingCountry.SelectedValue == "US" ? this.cmbBillingState.SelectedValue : this.txtBillingRegion.Text;
            payment.DonorZIP           = this.txtBillingZip.Text;

            BBNCExtensions.API.Transactions.Donations.RecordDonationReply reply = this.API.Transactions.RecordDonation(payment.GeneratePaymentArgs());
            if (!payment.InterpretPaymentReply(reply).Success)
            {
                this.lblSummary.Text  = "Payment of " + enteredAmount.ToString("c") + " accepted.";
                this.lblError.Visible = true;
                this.lblError.Text    = payment.InterpretPaymentReply(reply).Message;
                return(false);
            }
            else
            {
                return(true);
            }
        }