Closed mathis1337 closed 7 years ago
Nevermind, figured it out, however, I don't see SurePost as an option. Is this not included in here?
Is your code compiling? Should be var packages = new List<Package>();
SmartPost is it's own provider ... and a FedEx thing.
No I said SurePost. That is UPS not fedex feature.
Never heard of it. I'm sure it can be implemented. Send me a pull request!
I have copied the code exactly from test page and I am not getting anything back. Is my UPS license number my account number, or access key? Mind you I have tried both. I am using Origin zip of 79403 and destination of 34769. Any help is appreciated it. here Is what I have.
NameValueCollection appSettings = ConfigurationManager.AppSettings;
string upsLicenseNumber = appSettings[""]; //removed for security reasons string upsUserId = appSettings[""]; //removed for security reasons string upsPassword = appSettings[""]; //removed for security reasons
var packages = new List();
//packages.Add(new Package(12, 12, 12, 35, 150));
packages.Add(new Package(6, 6, 6, 2, 149));
var origin = new DotNetShipping.Address("", "", "79403", "US"); var destination = new DotNetShipping.Address("", "", "34769", "US"); // US Address
var rateManager = new RateManager();
rateManager.AddProvider(new UPSProvider(upsLicenseNumber, upsUserId, upsPassword));
Shipment shipment = rateManager.GetRates(origin, destination, packages);
foreach (Rate rate in shipment.Rates) { Console.WriteLine(rate.ToString()); }