checkoutconfirm returns to payment.info

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 13 ans
Ok this is my problem

When making a purchase in the store and filling out all information, you get to the checkoutconfirm page.  When you click the button it takes you back to the checkoutpaymentinfo page.  
So I thought that some payment information was missing, until I went to first data and looked at the transaction report.
Looking there the following information has been passed to them from the shopping cart.  First Name, Last Name, Address, city, State, Zip, Country, Credit Card Number, Exp Date, cvc.

Reading the code in the file CheckoutConfirm.ascx.cs file I see what is causing the redirect back to the checkoutpaymentinfo.aspx, but I don't know why.  

                    var paymentInfo = this.PaymentInfo;
                    if (paymentInfo == null)
                    {
                        var args1 = new CheckoutStepEventArgs() { OrderConfirmed = false };
                        OnCheckoutStepChanged(args1);
                        if (!this.OnePageCheckout)
                        {
                            Response.Redirect("~/checkoutpaymentinfo.aspx");
                        }
                        else
                        {
                            return;
                        }
                    }

I am using version 1.8

If paymentinfo is missing, why is FD getting all of it passed to processor?
So my question is what paymentinfo is missing?

Thanks for any help.
Il y a 13 ans
ok commented out a couple of line to stop it from going back to the checkoutpaymentinfo so that it would throw an error.

             {
                   Response.Write(paymentInfo)
                    
                   var paymentInfo = this.PaymentInfo;
                   Response.Write(paymentInfo)
                   if (paymentInfo == null)
                   // {
                        var args1 = new CheckoutStepEventArgs() { OrderConfirmed = false };
                        OnCheckoutStepChanged(args1);
                   //     if (!this.OnePageCheckout)
                        {
                   //         Response.Redirect("~/checkoutpaymentinfo.aspx");
                        }
                   //     else
                   //     {
                   //         return;
                   //    }
                   // }
                    paymentInfo.BillingAddress = NopContext.Current.User.BillingAddress;
                    paymentInfo.ShippingAddress = NopContext.Current.User.ShippingAddress;
                    paymentInfo.CustomerLanguage = NopContext.Current.WorkingLanguage;
                    paymentInfo.CustomerCurrency = NopContext.Current.WorkingCurrency;
Now I also added four Response.Write statements.  Two are in the page load and the other two are in the next button click method.  So when the page loads the values are there.  When you click the button, the values are gone which leads to the following error message.


System.NullReferenceException: Object reference not set to an instance of an object. at NopSolutions.NopCommerce.Web.Modules.CheckoutConfirmControl.btnNextStep_Click(Object sender, EventArgs e) in \NopCommerceStore\Modules\CheckoutConfirm.ascx.cs:line 69


Have been reading the boards, but can't find the answer.   No changes have been to to any other files yet

Any ideas on how to fix this?

Thanks
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.