-
Notifications
You must be signed in to change notification settings - Fork 62
Open
Description
When use UPS and UseNegotiatedRates = true with valid account and ShipperNumber, the server response doesn't contains the "NegotiatedRates" node. In the response details there is a Warning node "RatedShipmentWarning" = Invalid Origin State/Province.
Current code is not setting the Shipper province as you can see:
writer.WriteStartElement("Address");
writer.WriteElementString("PostalCode", Shipment.OriginAddress.PostalCode);
writer.WriteElementString("CountryCode", Shipment.OriginAddress.CountryCode);
writer.WriteEndElement(); // </Address>
Seems UPS needs the StateProvinceCode node in the Shipper Address if UseNegotiatedRates=true
If change code to:
writer.WriteStartElement("Address");
writer.WriteElementString("PostalCode", Shipment.OriginAddress.PostalCode);
writer.WriteElementString("CountryCode", Shipment.OriginAddress.CountryCode);
if (!string.IsNullOrWhiteSpace(Shipment.OriginAddress.State))//<RatedShipmentWarning>Invalid Origin State/Province</RatedShipmentWarning>
{
writer.WriteElementString("StateProvinceCode", Shipment.OriginAddress.State);
}
writer.WriteEndElement(); // </Address>
I receive the NegotiatedRates node completed.
There is any reason why the origin "StateProvinceCode" is not set?
Thank you.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels