Giter VIP home page Giter VIP logo

dotnetshipping's People

Contributors

amcintiremoncur avatar brettallred avatar ccockerhamkc avatar couellet avatar gkurts avatar jbrianskog avatar kylewest avatar maximelaboisson avatar musicmonkey5555 avatar pshaff avatar soulfire86 avatar stephenpadams avatar wildbillcat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotnetshipping's Issues

Not able to get International rate

@kylewest
I am not able to get International rate for address:
private readonly DotNetShipping.Address InternationalAddress;
InternationalAddress = new DotNetShipping.Address("General Pardinas, 72 2 A", "", "", "Madrid", "", "28006", "ES");
From address:
DomesticAddress = new DotNetShipping.Address("3701 Algonquin Road", "", "", "Rolling Meadows", "IL", "60008", "US");
packagesInternational = new List();
packagesInternational.Add(new Package(0, 0, 0, (decimal)(23/16), 0));
packagesInternational.Add(new Package(0, 0, 0, (decimal)(14/16), 0));

image

However I was able to get International rate on official UPS web site:

image

Rates to some countries fail because of RegionInfo call to get English name in Address.cs file

We had an issue with this and several countries. One issue is that we have a very old site and our system was storing England (EN) instead of Great Britain (GB). I had to manually translate this to GB before passing it in. That's fine and dandy as our DD should be changed to GB.
Other countries though have issues too. The RegionInfo call that is made to pull back the countries name from the 2 letter code errors for some countries do to that call. This relies on different versions of RegionInfo depending on system. On my development machine it works fine but if you deploy that to an older server, Say server 2008 R2. It will blow chunks with an error like below which you would see in your servers event viewer.

An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/8/ROOT/ShipCalc
Process ID: 28816
Exception: System.ArgumentException
Message: The region name BS should not correspond to neutral culture; a specific culture name is required.
Parameter name: name
StackTrace: at System.Globalization.RegionInfo..ctor(String name)
at DotNetShipping.Address.GetCountryName()
at DotNetShipping.ShippingProviders.USPSInternationalProvider.GetRates()

Specifically this is Barbados but many others also blow chunks. The worst part about this error is there is not only does the call fail, but it fails hard and eventually takes out the entire app pool breaking the application.
Ones I know have issues at times.
Bahamas (BS->BAHAMAS), Saint Vincent (VC -> GRENADINES), Hong Kong (HK->China), Tanzania (TZ->TANZANIA) , and South Korea (KR-> South Korea).

I pulled source and found where the issue is. Its in Address.cs and the call is

var regionInfo = new RegionInfo(CountryCode);
toReturn = regionInfo.EnglishName;

The correct fix would be to not rely on RegionInfo and instead have a translation list. I have replaced mine with custom translation for the countries we are having issues with.

FedEx International First

The key is missing for FedEx "INTERNATIONAL_FIRST". For some countries this is the first option, and this causes the FedEx provider to not return any rates.

Nuget package doesn't work in dot net 4.5

The NuGet package does not contain any assembly refrencesthat are compatible with the .NET Framework Version 4.5.
There should be something in it's description if it only supports specific versions.
Could it be updated to support 4.5?

UPS negotiated rates

I saw that bmcdavid added some overloads for UPS negotiated rates, but am not sure if they were ever incorporated into the codebase?

FedEx: Add option specifying which rate type to return (Retail, Negotiated, etc.)

It looks like the FedEx provider is returning the highest rate returned for each shipping option, so there is no way to get the negotiated rate for the account submitted. For instance, I'm testing shipping from Wisconsin to Canada. The rate on two of the RatedShipmentDetails are $23.90 (negotiated rate), but on the other two they are $70.65. Huge difference.

UPS & FedEx returning 0 rates for some Europe Addresses

I have an address "DotNetShipping.Address("15 rue Jean Starcky", "", "", "Mulhouse", "", "68057", "FR");" that is returning 0 rates from UPS and FedEx services. This is a problem for other Europe addresses as well. This has been a problem for quite a while.

Any help would be greatly appreciated.

UPS delivery date for ground

Hi: I'm noticing that the "deliveryDate" returned for UPS ground shows "12/31/9999" whereas all the Air rates have correct delivery dates in them.

I vaguely remember when I was trying to integrate expected delivery dates (several years ago) that the Rating API didn't return anything for ground, and you had to use the Time-In-Transit API instead.

Just curious if this in fact still true, and if anyone has attempted to integrate accurate delivery dates for UPS ground shipping into this project? (if not, and I'm correct that it needs to be implemented, I might be able to fork it in)

Could not create SSL/TLS secure channel

Hi. I've been looking at any number of solutions to this exception, but am still getting it. The error occurs on the GetRequestStream() call in UPSProvider.cs around line 205. Any help is greatly appreciated!

AppVeyor build fails on Pull Requests

@kylewest Not sure if you already knew this, but I looked into why the build fails on every PR and it turns out that it is because the Environment Variables are encrypted, and that by design AppVeyor won't use secured variables when building on a Pull Request since it could be a security risk.

So, I wanted to throw out 2 options I could see off the top of my head:

  1. In the settings, isn't there a way to just to not auto build on PRs?
  2. Just use some unencrypted credentials that are all just dev/test creds for each provider?

Is there any way to use Sandbox environment instead of Production?

For example, FedExProvider is using FedEx Web Services. As I know, they have a SOAP service with both Development and Production environments. On my opinion, it can be logical to add additional parameter to FedExProvider constructor to specify which environment we are going to use.

International USPS rate returns sometimes wrong because of incorrect rate return from USPS

I just encountered this new issue. It arises when you have several packages you are sending and USPS gives incomplete rate list. When this happens the shipping service just sums the totals and does not check to see if it got rates for each box. The example I have is that we split the order into 5 packages when giving a quote. The USPS Priority International rate was way cheaper then USPS Priority International Express. Digging into it I found that the call to the USPS specified 5 packages but only returned 2 for priority and all 5 for USPS Priority Express. This means that 3 whole packages were left out of the rate return. The issue occurs on line 136 of the USPSInternationalProvider.cs file.

var rates = document.Descendants("Service").GroupBy(item => (string) item.Element("SvcDescription")).Select(g => new {Name = g.Key, TotalCharges = g.Sum(x => Decimal.Parse((string) x.Element("Postage")))});

It assumes that you will get quotes for all or no boxes which is a pretty big issue if it only returns rates for two of them and causes the quote to be hundreds of dollars short. Looking into how to fix this one right now. Currently I'm under the gun to fix this as our management team wants to know why we underquoted a HK shipment by so much.

Attached is the Call and its return that we captured to debug the issue.

USPSRequest.txt

USPSResponse.txt

Fedex Does not calculate for home delivery - (included code modifications..)

I noticed that there is no way to specify that an address is residential, thus no way to get residential rates from Fedex. This can lead to lost money as the rates are slightly higher to a non business address. I made the following tweaks locally to make it work:

I added a public bool on Address called IsResidential

I added the home delivery rate option to FedExProvider:
{"GROUND_HOME_DELIVERY","FedEx Ground Home Delivery"},

I added these 2 lines to the SetDestination method in FedExProvider:
request.RequestedShipment.Recipient.Address.Residential = Shipment.DestinationAddress.IsResidential;
request.RequestedShipment.Recipient.Address.ResidentialSpecified = true;

Now I get the residential rates, let me know if you need any more info.

UPS Provider not honoring Residential Address

I just started testing out your assembly for our use. It appears that the UPS provider may not be honoring the IsResidential property. Are you aware of this and are there plans to fix it? Thanks so much!

UPS Saturday delivery not an option

I see in the UPS developers guide you can indicate Saturday delivery but don't see this option anywhere. Are there any plans to make this option available?

SmartPost Support?

How do I go about implementing Fedex SmartPost HubID and Indicia Type w/ the GetRates call and having SmartPost returned as a rate type?

Canadian UPS Shipping

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);

Get XML Request from request

Hi! When I talk to UPS Tech support they asked to provide only XML Request to them. How can I get XML Request from code? Optional: how to get XML response? Thank you!

Fedex UK destination addresses return no rates

UK Destination addresses result in a rate type of INTERNATIONAL_FIRST which is not included in the _serviceCodes Dictionary in the FedexProvider. This results in an exception being thrown when the rate is added and no rates being added to the shipment.

"rates" is ambiguous?

Hi: Sorry for the noob question, but I'm trying to follow your sample and I'm getting a compile error in VS2012:

Error 1 'Rates' is ambiguous because multiple kinds of members with this name exist in class 'DotNetShipping.Shipment'.

When I let intellisense pull up the methods for "shipment", "rates" is not in there? Here's a screencap of my code:

untitled-1

Address in Spain does not return UPS rate

Have problem specifically with Spain.
Address 1 in Madrid, Spain, weight = 37 ounces:
Address 2 in Barcelona, Spain weight = 144 ounces:
InternationalAddress9 = new DotNetShipping.Address("C/General Pardinas, 72 2 A", "", "", "Madrid", "", "28006", "ES");
InternationalAddress10 = new DotNetShipping.Address("C/Badajoz 73-77", "", "", "Barcelona", "", "E-08005", "ES");

Ship-from: DomesticAddress = new DotNetShipping.Address("3701 Algonquin Road", "", "", "Rolling Meadows", "IL", "60008", "US");

UseNegotiatedRates = true;

Let me know.

USPS Expected Delivery Date

Im getting some strange results with the USPS Expected Delivery Date, even tho the packages are more expensive the date stays the same. Also I havent found a way to remove certain service types by USPS, I currently do so like this:

shipment.Rates.Where(r => r.Name != "USPS Library Mail Parcel" &&
r.Name != "USPS Media Mail Parcel" &&
!r.Name.Contains("Hold For Pickup")
).OrderBy(s => s.TotalCharges).ToArray();

UPS International rate is not correct

@kylewest
For address:
InternationalAddress = new DotNetShipping.Address("345A Forbes Road Zone 6 - Meadowlands", "", "", "Johannesburg", "", "1852", "ZA");

it returns incorrect UPS shipping rate.
Package weight: 1.4 pounds
From address:
DomesticAddress = new DotNetShipping.Address("3701 Algonquin Road", "", "", "Rolling Meadows", "IL", "60008", "US");
southafrica

USPS Provider not submitting "LARGE", "Width", "Height", etc

Hello,
I noticed that USPSProvider.cs has a TODO at line 91 in GetRates() and submission of the dimension props are commented out. USPS specs says it needs the dimensions for "LARGE" packages. Should GetRates() actually be passing this info and this just hasn't been implemented yet or is there some other reason it hasn't been done (e.g. maybe USPS typically ends of giving the same rates for REGULAR and LARGE)?

Only getting one FedEx rate

When I run the sample app, I only get one rate (FedEx Ground) instead of all the options. Is this because I am running against FedEx test or am I missing something?

USPS returns multiple rates and ignores dimensions

We are specifying dimensions of a package however USPS returns us multiple rates that include the dimension in the name.

For example:

  • Priority Mail 3-Days Medium Flat Rate Box
  • Priority Mail 3-Days Large Flat Rate Box

However we specified the dimensions in the request and according to their site it should match a Large box.

UPS Rates Not being returned

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());
}

Shipment.ServerErrors are not used for FedExProvider

I see that inside FedExProvider you are using ShowNotifications to output errors/notifications. However you are using Debug.WriteLine which is not always good. I also see that there is a Shipment.ServerErrors inside AbstractShippingProvider class, which is already used to store errors from USPS (there is a method protected void AddError(USPSError error)). So I can suggest to use similar logic for all providers and populate Shipment.ServerErrors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.