Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canadian UPS Shipping #45

Open
OpacityKelly opened this issue Apr 19, 2016 · 1 comment
Open

Canadian UPS Shipping #45

OpacityKelly opened this issue Apr 19, 2016 · 1 comment

Comments

@OpacityKelly
Copy link

Hi guys! I can't seem to get Canadian addresses with postal codes to work. Please let me know if I'm missing something. Also, I need to get rates for Canada to US. US to US works great though. Any help would be great - Much appreciated!

            var packages = new List<Package>();
            foreach (var item in dovm.OrderItems.ToList())
                foreach (var box in item.Boxes)
                    packages.Add(new Package(box.Length, box.Width, box.Height, box.Weight, item.Price));

            var origin = new Address("", "", "V3S8E5", "CA");
            var destination = new Address("", "", "T8E2C7", "CA"); // US Address

            var rateManager = new RateManager();

            rateManager.AddProvider(new UPSProvider(upsLicenseNumber, upsUserId, upsPassword));
            Shipment shipment = rateManager.GetRates(origin, destination, packages);
@kylewest
Copy link
Owner

I just tried this in the same app with my account login and your addresses and it worked.

screen shot 2016-04-20 at 12 59 36 am

  • Are you sure packages.Count() > 0?
  • Does your UPS account have access to the Canadian rates (I'm not sure you can get an account without access to those rates, but something to consider).

Kyle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants