Has anyone successfully added SurePost to this module? I thought I made all the right changes but this service is not being quoted (although I have successfully quoted it with the same account information using the PHP UPS API by Gabriel Bull.
Printable View
Has anyone successfully added SurePost to this module? I thought I made all the right changes but this service is not being quoted (although I have successfully quoted it with the same account information using the PHP UPS API by Gabriel Bull.
Looks as though SurePost is not supported in the Rating API as a normal service code (although it is in the Shipping API).
155f with multiship
location properly set and zone blank in mod.
Checked all user/pass/key entries for accuracy
Zone blank in mod but says can't ship to TX
Getting following when dumping logCode:------------------------------------------DATE AND TIME: 2018-02-16 02:47:04
UPS URL: https://onlinetools.ups.com:443/ups.app/xml/TimeInTransit
UPS REQUEST: <?xml version="1.0"?>
<AccessRequest xml:lang="en-US">
<AccessLicenseNumber>************</AccessLicenseNumber>
<UserId>******</UserId>
<Password>******</Password>
</AccessRequest>
<?xml version="1.0"?>
<TimeInTransitRequest xml:lang="en-US">
<Request>
<TransactionReference>
<CustomerContext>Time in Transit</CustomerContext>
<XpciVersion>1.0002</XpciVersion>
</TransactionReference>
<RequestAction>TimeInTransit</RequestAction>
</Request>
<TransitFrom>
<AddressArtifactFormat>
<PoliticalDivision2>Fort Davis</PoliticalDivision2>
<PoliticalDivision1>Texas</PoliticalDivision1>
<CountryCode>US</CountryCode>
<PostcodePrimaryLow>79734</PostcodePrimaryLow>
</AddressArtifactFormat>
</TransitFrom>
<TransitTo>
<AddressArtifactFormat>
<PoliticalDivision2>Bulverde</PoliticalDivision2>
<PoliticalDivision1>TX</PoliticalDivision1>
<CountryCode>US</CountryCode>
<PostcodePrimaryLow>78163</PostcodePrimaryLow>
<PostcodePrimaryHigh>78163</PostcodePrimaryHigh>
</AddressArtifactFormat>
</TransitTo>
<PickupDate>20180217</PickupDate>
<ShipmentWeight>
<UnitOfMeasurement>
<Code>LBS</Code>
</UnitOfMeasurement>
<Weight>10</Weight>
</ShipmentWeight>
<InvoiceLineTotal>
<CurrencyCode>USD</CurrencyCode>
<MonetaryValue>100</MonetaryValue>
</InvoiceLineTotal>
</TimeInTransitRequest>
UPS RESPONSE: <?xml version="1.0"?><TimeInTransitResponse><Response><TransactionReference><CustomerContext>Time in Transit</CustomerContext><XpciVersion>1.0002</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response><TransitResponse><PickupDate>2018-02-17</PickupDate><TransitFrom><AddressArtifactFormat><PoliticalDivision2>FORT DAVIS</PoliticalDivision2><PoliticalDivision1>TX</PoliticalDivision1><Country>UNITED STATES</Country><CountryCode>US</CountryCode><PostcodePrimaryLow>79734</PostcodePrimaryLow></AddressArtifactFormat></TransitFrom><TransitTo><AddressArtifactFormat><PoliticalDivision2>BULVERDE</PoliticalDivision2><PoliticalDivision1>TX</PoliticalDivision1><Country>UNITED STATES</Country><CountryCode>US</CountryCode><PostcodePrimaryLow>78163</PostcodePrimaryLow></AddressArtifactFormat></TransitTo><ShipmentWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>10.0</Weight></ShipmentWeight><InvoiceLineTotal><CurrencyCode>USD</CurrencyCode><MonetaryValue>100.00</MonetaryValue></InvoiceLineTotal><Disclaimer>Services listed as guaranteed are backed by a money-back guarantee for transportation charges only. UPS guarantees the day of delivery for every ground package you ship to any address within all 50 states and Puerto Rico. See Terms and Conditions in the Service Guide for details.</Disclaimer><ServiceSummary><Service><Code>1DM</Code><Description>UPS Next Day Air Early</Description></Service><Guaranteed><Code>Y</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>1</BusinessTransitDays><Time>08:30:00</Time><PickupDate>2018-02-17</PickupDate><PickupTime>19:00:00</PickupTime><Date>2018-02-19</Date><DayOfWeek>MON</DayOfWeek><CustomerCenterCutoff>18:00:00</CustomerCenterCutoff></EstimatedArrival></ServiceSummary><ServiceSummary><Service><Code>1DA</Code><Description>UPS Next Day Air</Description></Service><Guaranteed><Code>Y</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>1</BusinessTransitDays><Time>10:30:00</Time><PickupDate>2018-02-17</PickupDate><PickupTime>19:00:00</PickupTime><Date>2018-02-19</Date><DayOfWeek>MON</DayOfWeek><CustomerCenterCutoff>18:00:00</CustomerCenterCutoff></EstimatedArrival></ServiceSummary><ServiceSummary><Service><Code>1DP</Code><Description>UPS Next Day Air Saver</Description></Service><Guaranteed><Code>Y</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>1</BusinessTransitDays><Time>15:00:00</Time><PickupDate>2018-02-17</PickupDate><PickupTime>19:00:00</PickupTime><Date>2018-02-19</Date><DayOfWeek>MON</DayOfWeek><CustomerCenterCutoff>18:00:00</CustomerCenterCutoff></EstimatedArrival></ServiceSummary><ServiceSummary><Service><Code>2DM</Code><Description>UPS 2nd Day Air A.M.</Description></Service><Guaranteed><Code>Y</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>2</BusinessTransitDays><Time>10:30:00</Time><PickupDate>2018-02-17</PickupDate><PickupTime>19:00:00</PickupTime><Date>2018-02-20</Date><DayOfWeek>TUE</DayOfWeek><CustomerCenterCutoff>18:00:00</CustomerCenterCutoff></EstimatedArrival></ServiceSummary><ServiceSummary><Service><Code>2DA</Code><Description>UPS 2nd Day Air</Description></Service><Guaranteed><Code>Y</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>2</BusinessTransitDays><Time>23:00:00</Time><PickupDate>2018-02-17</PickupDate><PickupTime>19:00:00</PickupTime><Date>2018-02-20</Date><DayOfWeek>TUE</DayOfWeek><CustomerCenterCutoff>18:00:00</CustomerCenterCutoff></EstimatedArrival></ServiceSummary><ServiceSummary><Service><Code>GND</Code><Description>UPS Ground</Description></Service><Guaranteed><Code>Y</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>2</BusinessTransitDays><Time>23:00:00</Time><PickupDate>2018-02-19</PickupDate><PickupTime>19:00:00</PickupTime><Date>2018-02-21</Date><DayOfWeek>WED</DayOfWeek><CustomerCenterCutoff>18:00:00</CustomerCenterCutoff></EstimatedArrival></ServiceSummary><MaximumListSize>35</MaximumListSize></TransitResponse></TimeInTransitResponse>
------------------------------------------
Business Transit: UPS Next Day Air Early = 2018-02-19
Business Transit: UPS Next Day Air = 2018-02-19
Business Transit: UPS Next Day Air Saver = 2018-02-19
Business Transit: UPS 2nd Day Air A.M. = 2018-02-20
Business Transit: UPS 2nd Day Air = 2018-02-20
Business Transit: UPS Ground = 2018-02-21
------------------------------------------
Time in Transit: 0
Shipping weight: 3.9375
Shipping Num Boxes: 1
this: upsxml::__set_state(array(
'code' => 'upsxml',
'title' => 'United Parcel Service',
'description' => 'United Parcel Service',
'icon' => 'includes/templates/*********//images/icons/shipping_ups.gif',
'enabled' => true,
'types' => NULL,
'boxcount' => NULL,
'moduleVersion' => '1.7.2',
'sort_order' => '20',
'tax_class' => '1',
'access_key' => '*****************',
'access_username' => '*********',
'access_password' => '***********',
'origin' => 'US Origin',
'origin_city' => 'Fort Davis',
'origin_stateprov' => 'Texas',
'origin_country' => 'US',
'origin_postalcode' => '79734',
'pickup_method' => 'Daily Pickup',
'package_type' => 'Customer Package',
'unit_weight' => 'LBS',
'unit_length' => 'IN',
'handling_fee' => '.5',
'quote_type' => 'Residential',
'upsShipperNumber' => '********',
'displayWeight' => true,
'displayTransitTime' => true,
'currencyCode' => 'USD',
'customer_classification' => '01',
'protocol' => 'https',
'host' => 'onlinetools.ups.com',
'port' => '443',
'path' => '/ups.app/xml/Rate',
'transitpath' => '/ups.app/xml/TimeInTransit',
'version' => 'UPSXML Rate 1.0001',
'transitversion' => 'UPSXML Time In Transit 1.0002',
'timeout' => '60',
'xpci_version' => '1.0001',
'transitxpci_version' => '1.0002',
'items_qty' => 1,
'timeintransit' => '0',
'today' => '20180216',
'pkgvalue' => 74,
'logfile' => '/home/*******/public_html/155f/logs/upsxml.log',
'pickup_methods' =>
array (
'Daily Pickup' => '01',
'Customer Counter' => '03',
'One Time Pickup' => '06',
'On Call Air Pickup' => '07',
'Letter Center' => '09',
'Air Service Center' => '10',
),
'package_types' =>
array (
'Unknown' => '00',
'UPS Letter' => '01',
'Customer Package' => '02',
'UPS Tube' => '03',
'UPS Pak' => '04',
'UPS Express Box' => '21',
'UPS 25kg Box' => '24',
'UPS 10kg Box' => '25',
),
'service_codes' =>
array (
'US Origin' =>
array (
'01' => 'UPS Next Day Air',
'02' => 'UPS 2nd Day Air',
'03' => 'UPS Ground',
'07' => 'UPS Worldwide Express',
'08' => 'UPS Worldwide Expedited',
11 => 'UPS Standard',
12 => 'UPS 3 Day Select',
13 => 'UPS Next Day Air Saver',
14 => 'UPS Next Day Air Early A.M.',
54 => 'UPS Worldwide Express Plus',
59 => 'UPS 2nd Day Air A.M.',
65 => 'UPS Express Saver',
),
'Canada Origin' =>
array (
'01' => 'UPS Express',
'07' => 'UPS Worldwide Express',
'08' => 'UPS Worldwide Expedited',
11 => 'UPS Standard',
12 => 'UPS 3 Day Select',
13 => 'UPS Express Saver',
14 => 'UPS Express Early A.M.',
54 => 'UPS Worldwide Express Plus',
),
'European Union Origin' =>
array (
'07' => 'UPS Express',
'08' => 'UPS Expedited',
11 => 'UPS Standard',
54 => 'UPS Worldwide Express Plus',
64 => 'MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_64',
65 => 'UPS Express NA1',
),
'Puerto Rico Origin' =>
array (
'01' => 'UPS Next Day Air',
'02' => 'UPS 2nd Day Air',
'03' => 'UPS Ground',
'07' => 'UPS Worldwide Express',
'08' => 'UPS Worldwide Expedited',
14 => 'UPS Next Day Air® Early A.M.',
54 => 'UPS Worldwide Express Plus',
),
'Mexico Origin' =>
array (
'07' => 'UPS Worldwide Express',
'08' => 'UPS Worldwide Expedited',
54 => 'UPS Worldwide Express Plus',
),
'All other origins' =>
array (
'07' => 'UPS Worldwide Express',
'08' => 'UPS Worldwide Expedited',
54 => 'UPS Worldwide Express Plus',
),
),
'_upsOriginCity' => 'Fort Davis',
'_upsOriginStateProv' => 'Texas',
'_upsOriginCountryCode' => 'US',
'_upsOriginPostalCode' => '79734',
'_upsDestCity' => 'Bulverde',
'_upsDestStateProv' => 'TX',
'_upsDestCountryCode' => 'US',
'_upsDestPostalCode' => '78163',
'item_length' =>
array (
0 => '0',
),
'item_width' =>
array (
0 => '0',
),
'item_height' =>
array (
0 => '0',
),
'item_weight' =>
array (
0 => '3.9',
),
'numberServices' => 6,
'servicesTimeintransit' =>
array (
'UPS Next Day Air Early' =>
array (
'days' => '1',
'date' => '2018-02-19',
'guaranteed' => 'Y',
),
'UPS Next Day Air' =>
array (
'days' => '1',
'date' => '2018-02-19',
'guaranteed' => 'Y',
),
'UPS Next Day Air Saver' =>
array (
'days' => '1',
'date' => '2018-02-19',
'guaranteed' => 'Y',
),
'UPS 2nd Day Air A.M.' =>
array (
'days' => '2',
'date' => '2018-02-20',
'guaranteed' => 'Y',
),
'UPS 2nd Day Air' =>
array (
'days' => '2',
'date' => '2018-02-20',
'guaranteed' => 'Y',
),
'UPS Ground' =>
array (
'days' => '2',
'date' => '2018-02-21',
'guaranteed' => 'Y',
),
),
))
------------------------------------------
DATE AND TIME: 2018-02-16 02:47:05
UPS URL: https://onlinetools.ups.com:443/ups.app/xml/Rate
UPS REQUEST: <?xml version="1.0"?>
<AccessRequest xml:lang="en-US">
<AccessLicenseNumber>******************</AccessLicenseNumber>
<UserId>********</UserId>
<Password>**********</Password>
</AccessRequest>
<?xml version="1.0"?>
<RatingServiceSelectionRequest xml:lang="en-US">
<Request>
<TransactionReference>
<CustomerContext>Rating and Service</CustomerContext>
<XpciVersion>1.0001</XpciVersion>
</TransactionReference>
<RequestAction>Rate</RequestAction>
<RequestOption>shop</RequestOption>
</Request>
<PickupType>
<Code>01</Code>
</PickupType>
<Shipment>
<RateInformation><NegotiatedRatesIndicator /></RateInformation>
<Shipper>
<Address>
<City>Fort Davis</City>
<StateProvinceCode>Texas</StateProvinceCode>
<CountryCode>US</CountryCode>
<PostalCode>79734</PostalCode>
</Address>
<ShipperNumber>******</ShipperNumber>
</Shipper>
<ShipTo>
<Address>
<City>Bulverde</City>
<StateProvinceCode>TX</StateProvinceCode>
<CountryCode>US</CountryCode>
<PostalCode>78163</PostalCode>
<ResidentialAddressIndicator/>
</Address>
</ShipTo>
<Package>
<PackagingType>
<Code>02</Code>
</PackagingType>
<PackageWeight>
<UnitOfMeasurement>
<Code>LBS</Code>
</UnitOfMeasurement>
<Weight>3.9</Weight>
</PackageWeight>
<PackageServiceOptions>
<InsuredValue>
<CurrencyCode>USD</CurrencyCode>
<MonetaryValue>74</MonetaryValue>
</InsuredValue>
</PackageServiceOptions>
</Package>
</Shipment>
<CustomerClassification>
<Code>01</Code>
</CustomerClassification>
</RatingServiceSelectionRequest>
UPS RESPONSE: <?xml version="1.0"?>
<RatingServiceSelectionResponse><Response><TransactionReference><CustomerContext>Rating and Service</CustomerContext><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>0</ResponseStatusCode><ResponseStatusDescription>Failure</ResponseStatusDescription><Error><ErrorSeverity>Hard</ErrorSeverity><ErrorCode>111286</ErrorCode><ErrorDescription>Texas is not a valid state for the specified shipment.</ErrorDescription></Error></Response></RatingServiceSelectionResponse>
You need to use a 2 letter code (TX) not a spelled out state name (Texas). That's the problem.
BUT... Everything's bigger in Texas.
:blush: it says right there, "two-digit code"
haste makes things go wrong - or something like that.
Hello everyone!
What is the difference (if there is any) between "00 - Account Rates" and "01 - If you are billing to a UPS account and have a daily UPS pickup"?
Attachment 17858
It seems wrong to show different rates if the state is not filled in. Some people will just enter a zip and think that's their rate.
Options:
- Disable the submit button on shipping estimator until a state is selected.
- Don't return values from UPSXML if the state is not selected.
Thoughts?
I agree (see https://github.com/lat9/upsxml/issues/8). I'll go with option-2, since I don't think it's appropriate for a shipping module to include a template-override for the shipping-estimator's page.
That's fair. And it makes it a pretty straightforward change.