Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matt Taylor 873 posts 2086 karma points
    Aug 12, 2011 @ 13:47
    Matt Taylor
    0

    Problem changing the current country not changing the payment method

    I've got two countries set up:

        United Kingdom
        Australia

    and I've also set up different VAT rules for each one where the UK pays VAT and Oz does not.

    I've also got two payment methods set up:

        Account
        PayPal Sandbox

    There isn't a step that allows the selection of the payment method in my cart as in reality there will be only one in use for now, but for testing purposes:

    The 'Standard payment method' for the UK is set to Account (as per the starter kit).
    The 'Standard payment method' for Australia is set to PayPal Sandbox.

    So I'm expecting these defaults to be used.

    On my customer information page I ask the user to select their country and I then set the current country accordingly using the following .Net code.

    protected void saveLinkButton_Click(object sender, EventArgs e)
            {      
                    if (Page.IsValid)
                    {
                        TeaCommerce.Base.UpdateOrderProperty("company", companyTextBox.Text);
                        TeaCommerce.Base.UpdateOrderProperty("firstName", firstNameTextBox.Text);
                        TeaCommerce.Base.UpdateOrderProperty("lastName", lastNameTextBox.Text);
                        TeaCommerce.Base.UpdateOrderProperty("email", emailTextBox.Text);
                        TeaCommerce.Base.UpdateOrderProperty("telephone", telephoneTextBox.Text);
                        TeaCommerce.Base.UpdateOrderProperty("streetAddress", addressStreetTextBox.Text);
                        TeaCommerce.Base.UpdateOrderProperty("zipCode", addressPostcodeTextBox.Text);
                        TeaCommerce.Base.UpdateOrderProperty("city", addressCityTextBox.Text);
                        TeaCommerce.Base.UpdateOrderProperty("country", addressCountryDropDownList.SelectedItem.Text);
                        TeaCommerce.Base.UpdateOrderProperty("countryID", addressCountryDropDownList.SelectedValue);
                        Country selectedCountry = TeaCommerce.Data.Country.GetCountry(long.Parse(addressCountryDropDownList.SelectedValue));
                        TeaCommerce.Base.UpdateOrderProperty("ISOCountryCode", selectedCountry.CountryCode);
                        TeaCommerce.Base.UpdateOrderProperty("comments", commentsTextBox.Text);

                        TeaCommerce.Base.SetCurrentCountry(selectedCountry.Id);

                        Response.Redirect(new Node(_continuePageID).Url);

                    }              
            }


    If I select Australia as the country, no VAT is added as expected and when calling

    TeaCommerce.goToPayment();


    I'm sent to the Sandox OK.

    If I then exit out of the S

  • Rune Grønkjær 1372 posts 3103 karma points
    Aug 14, 2011 @ 09:21
  • Anders Burla 2560 posts 8256 karma points
    Aug 16, 2011 @ 15:47
    Anders Burla
    0

    Hi Matt

    Could you mark the last post as the solution so people easily can find the other post?

    /Anders

Please Sign in or register to post replies

Write your reply to:

Draft