Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New UPS XML Shipping Module available


Recommended Posts

Disabled now, still no quote (straight rates for us, no fancy stuff)

when I uncheck SAVER I receive a quot doh.

 

Only now a ghost quote pops up, carrying no description. Being the lowest rate it will be selected the most.

 

Is there a shipping option missing in the list of Disallowed Shipping Methods?

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

Only now a ghost quote pops up, carrying no description. Being the lowest rate it will be selected the most.

 

Is there a shipping option missing in the list of Disallowed Shipping Methods?

More like a missing one in the language file. An error like that has been reported to give such an effect. Perhaps you can enable logging (adding a log file and remove a comment out in the shipping module upsxml.php to see what UPS gives back.

 

I know the module needed some hack in TimeTransitResponse because of UPS not being consistent with the naming of one of the newer options (UPS Saver):

// hack to get EDD for UPS Saver recognized (Time in Transit uses UPS Worldwide Saver
// but the service in Rates and Services is called UPS Saver)

Link to comment
Share on other sites

Don't you just love consistency? :rolleyes:

 

For example, I found that the list rates service accepts 8-digit Brazilian postcodes but the negotiated rates service does not. Oh, and as also noted earlier, the negotiates rates server goes down for several hours on Sunday while the list rates server does not.

Link to comment
Share on other sites

More like a missing one in the language file. An error like that has been reported to give such an effect. Perhaps you can enable logging (adding a log file and remove a comment out in the shipping module upsxml.php to see what UPS gives back.

 

I know the module needed some hack in TimeTransitResponse because of UPS not being consistent with the naming of one of the newer options (UPS Saver):

// hack to get EDD for UPS Saver recognized (Time in Transit uses UPS Worldwide Saver
// but the service in Rates and Services is called UPS Saver)

 

 

something funny happends here, if I strike all the(se) options out

 

Next Day Air

2nd Day Air

Ground

Worldwide Express

Worldwide Express Plus

Worldwide Expedited

Express

Standard

3 Day Select

Next Day Air Saver

Next Day Air Early A.M.

Expedited

2nd Day Air A.M.

Saver

Express Early A.M.

Express Plus

Today Standard

Today Dedicated Courier

Today Intercity

 

there still is a non taged shipping option left for addresses in the USA...

 

Any surgestions guys?

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

something funny happends here, if I strike all the(se) options out

 

there still is a non taged shipping option left for addresses in the USA...

 

Any surgestions guys?

Enable logging (as mentioned above). Then see what shipping options (they are given as numbers) are returned. If the numbers are not in the language define of your origin (Europe, USA, Canada, Mexico) then the number cannot converted to a name.

Link to comment
Share on other sites

continuing from the last post

 

this is the responce from UPS when all send methodes are switched off

 

(still one ghost quotation for parcels to the USA)

 

UPS RESPONSE: <?xml version="1.0"?><RatingServiceSelectionResponse><Response><TransactionReference><CustomerContext>Rating and Service</CustomerContext><XpciVersion>1.0001</XpciVersion></TransactionReference><ResponseStatusCode>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response><RatedShipment><Service><Code>07</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>KGS</Code></UnitOfMeasurement><Weight>1.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>EUR</CurrencyCode><MonetaryValue>89.48</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>EUR</CurrencyCode><MonetaryValue>4.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>EUR</CurrencyCode><MonetaryValue>93.98</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>12:00 Noon</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode> </CurrencyCode><MonetaryValue> </MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode> </CurrencyCode><MonetaryValue> </MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode> </CurrencyCode><MonetaryValue> </MonetaryValue></TotalCharges><Weight>1.0</Weight><BillingWeight><UnitOfMeasurement><Code> </Code></UnitOfMeasurement><Weight> </Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>08</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>KGS</Code></UnitOfMeasurement><Weight>1.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>EUR</CurrencyCode><MonetaryValue>83.36</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>EUR</CurrencyCode><MonetaryValue>4.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>EUR</CurrencyCode><MonetaryValue>87.86</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery></GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode> </CurrencyCode><MonetaryValue> </MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode> </CurrencyCode><MonetaryValue> </MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode> </CurrencyCode><MonetaryValue> </MonetaryValue></TotalCharges><Weight>1.0</Weight><BillingWeight><UnitOfMeasurement><Code> </Code></UnitOfMeasurement><Weight> </Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>65</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>KGS</Code></UnitOfMeasurement><Weight>1.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>EUR</CurrencyCode><MonetaryValue>87.36</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>EUR</CurrencyCode><MonetaryValue>4.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>EUR</CurrencyCode><MonetaryValue>91.86</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>4:30 P.M.</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode> </CurrencyCode><MonetaryValue> </MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode> </CurrencyCode><MonetaryValue> </MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode> </CurrencyCode><MonetaryValue> </MonetaryValue></TotalCharges><Weight>1.0</Weight><BillingWeight><UnitOfMeasurement><Code> </Code></UnitOfMeasurement><Weight> </Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>54</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>KGS</Code></UnitOfMeasurement><Weight>1.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>EUR</CurrencyCode><MonetaryValue>158.41</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>EUR</CurrencyCode><MonetaryValue>4.50</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>EUR</CurrencyCode><MonetaryValue>162.91</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime>10:00 A.M.</ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode> </CurrencyCode><MonetaryValue> </MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode> </CurrencyCode><MonetaryValue> </MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode> </CurrencyCode><MonetaryValue> </MonetaryValue></TotalCharges><Weight>1.0</Weight><BillingWeight><UnitOfMeasurement><Code> </Code></UnitOfMeasurement><Weight> </Weight></BillingWeight></RatedPackage></RatedShipment></RatingServiceSelectionResponse>

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

this is the responce from UPS when all send methodes are switched off

 

(still one ghost quotation for parcels to the USA)

The one that is missing in the language defines is number 8. In a document of October 2007 I now found that they added Expedited to European origins. They changed (put less information in it) their documentation quite a bit so I never went through it with a fine comb.

 

Better add this to your language file:

define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_08', 'UPS Expedited');

The ghost should be gone then. Since the number is not replaced by a name, it cannot be filtered out by the "exclude" function. Therefore it still comes up, even if you excluded Expedited.

Link to comment
Share on other sites

Better add this to your language file:

define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_08', 'UPS Expedited');

The ghost should be gone then. Since the number is not replaced by a name, it cannot be filtered out by the "exclude" function. Therefore it still comes up, even if you excluded Expedited.

 

Sorry to be a spoil but the ghost line still is after adding;

 

define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_08', 'UPS Expedited');

 

in /catalog/includes/languages/dutch/modules/shipping/upsxml.php

 

now it looks like this

 

<?php
/*
 $Id: upsxml.php, v1.3 2007/12/24 JanZ Exp $

 Written by Torin Walker
 [email protected]

 Last update in accordance with UPS OnLine Tools, Rates and Service Selection, XML Programming Information,
 Version 1.0, Volume 7, Number 1, Revision Date: December 17, 2006

 Copyright(c) 2003 by Torin Walker, All rights reserved.

 Released under the GNU General Public License
*/

define('MODULE_SHIPPING_UPSXML_RATES_TEXT_TITLE', 'United Parcel Service');
define('MODULE_SHIPPING_UPSXML_RATES_TEXT_DESCRIPTION', 'United Parcel Service (XML)');
define('MODULE_SHIPPING_UPSXML_RATES_TEXT_UNKNOWN_ERROR', 'An unknown error occured with the UPS shipping calculations.');
define('MODULE_SHIPPING_UPSXML_RATES_TEXT_IF_YOU_PREFER', 'If you prefer to use UPS as your shipping method, please contact');
define('MODULE_SHIPPING_UPSXML_RATES_TEXT_COMM_ERROR', 'A communication error occured while attempting to contact the UPS gateway');
define('MODULE_SHIPPING_UPSXML_RATES_TEXT_COMM_UNKNOWN_ERROR', 'An unknown error occured while attempting to contact the UPS gateway');
define('MODULE_SHIPPING_UPSXML_RATES_TEXT_COMM_VERSION_ERROR', 'This module supports only xpci version 1.0001 of the UPS Rates Interface. Please contact the webmaster for additional assistance.');
define('MODULE_SHIPPING_UPSXML_TIME_IN_TRANSIT_TEXT_NO_RATES','UPS returns success, but no EDDs were found');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_01', 'UPS Next Day Air');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_02', 'UPS 2nd Day Air');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_03', 'UPS Ground');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_07', 'UPS Worldwide Express');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_08', 'UPS Worldwide Expedited');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_11', 'UPS Standard');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_12', 'UPS 3 Day Select');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_13', 'UPS Next Day Air Saver');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_14', 'UPS Next Day Air Early A.M.');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_54', 'UPS Worldwide Express Plus');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_59', 'UPS 2nd Day Air A.M.');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_US_ORIGIN_65', 'UPS Saver');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_CANADA_ORIGIN_01', 'UPS Express');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_CANADA_ORIGIN_02', 'UPS Expedited');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_CANADA_ORIGIN_07', 'UPS Worldwide Express');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_CANADA_ORIGIN_08', 'UPS Worldwide Expedited');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_CANADA_ORIGIN_11', 'UPS Standard');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_CANADA_ORIGIN_12', 'UPS 3 Day Select');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_CANADA_ORIGIN_13', 'UPS Saver');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_CANADA_ORIGIN_14', 'UPS Express Early A.M.');
// CANADA origin 54 will not be offered after Jan 2, 2007
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_CANADA_ORIGIN_54', 'UPS Worldwide Express Plus');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_CANADA_ORIGIN_65', 'UPS Saver');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_07', 'UPS Express');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_08', 'UPS Expedited');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_11', 'UPS Standard');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_54', 'UPS Worldwide Express Plus');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_65', 'UPS Saver');
// next three services Poland domestic only (Stolica) 
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_82', 'UPS Today Standard');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_83', 'UPS Today Dedicated Courier');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_84', 'UPS Today Intercity');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_PR_ORIGIN_01', 'UPS Next Day Air');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_PR_ORIGIN_02', 'UPS 2nd Day Air');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_PR_ORIGIN_03', 'UPS Ground');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_PR_ORIGIN_07', 'UPS Worldwide Express');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_PR_ORIGIN_08', 'UPS Worldwide Expedited');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_PR_ORIGIN_14', 'UPS Next Day Air Early A.M.');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_PR_ORIGIN_54', 'UPS Worldwide Express Plus');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_PR_ORIGIN_65', 'UPS Saver');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_MEXICO_ORIGIN_07', 'UPS Express');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_MEXICO_ORIGIN_08', 'UPS Expedited');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_MEXICO_ORIGIN_54', 'UPS Express Plus');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_MEXICO_ORIGIN_65', 'UPS Saver');
// service 7 seems to be gone by Jan 2, 2007 for other origins
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_OTHER_ORIGIN_07', 'UPS Worldwide Express');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_OTHER_ORIGIN_08', 'UPS Worldwide Expedited');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_OTHER_ORIGIN_54', 'UPS Worldwide Express Plus');
define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_PR_ORIGIN_65', 'UPS Saver');

define('UPSXML_US_01', 'Next Day Air');
define('UPSXML_US_02', '2nd Day Air');
define('UPSXML_US_03', 'Ground');
define('UPSXML_US_07', 'Worldwide Express');
define('UPSXML_US_08', 'Worldwide Expedited');
define('UPSXML_US_11', 'Standard');
define('UPSXML_US_12', '3 Day Select');
define('UPSXML_US_13', 'Next Day Air Saver');
define('UPSXML_US_14', 'Next Day Air Early A.M.');
define('UPSXML_US_54', 'Worldwide Express Plus');
define('UPSXML_US_59', '2nd Day Air A.M.');
define('UPSXML_US_65', 'Saver');
define('UPSXML_CAN_01', 'Express');
define('UPSXML_CAN_02', 'Expedited');
define('UPSXML_CAN_14', 'Express Early A.M.');
define('UPSXML_EU_82', 'Today Standard');
define('UPSXML_EU_83', 'Today Dedicated Courier');
define('UPSXML_EU_84', 'Today Intercity');
define('UPSXML_MEX_54', 'Express Plus');
?>

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

Sorry to be a spoil but the ghost line still is after adding;

 

define('MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_08', 'UPS Expedited');

 

in /catalog/includes/languages/dutch/modules/shipping/upsxml.php

OK, I guess you will also need to add it to the shipping module itself then (around line 189):

			// European Union Origin
		'European Union Origin' => array(
			'07' => MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_07,
			'08' => MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_08,

Link to comment
Share on other sites

OK, I guess you will also need to add it to the shipping module itself then (around line 189):

			// European Union Origin
		'European Union Origin' => array(
			'07' => MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_07,
			'08' => MODULE_SHIPPING_UPSXML_SERVICE_CODE_EU_ORIGIN_08,

 

You're great Jan, this did the trick

 

THNX a lot

Grtz

 

HanZ

 

 

 

-----------

Life is simple, only people make it complicated...

Louis Couperus, Dutch writer (1863-1923)

Link to comment
Share on other sites

Hi, I'm getting the code error " 110099: Validation Error: " Can you let me in on what you did, I'm new to this. Thanks Jim

Sounds like you don't have an account with UPS or didn't enter the correct password/keys in the admin.

Link to comment
Share on other sites

I am getting this error log

 

<?xml version="1.0" encoding="utf-8"?>------------------------------------------

DATE AND TIME: 2008-02-06 20:48:47

UPS URL: https://www.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>

<Shipper>

<Address>

<City>Saugus</City>

<StateProvinceCode>MA</StateProvinceCode>

<CountryCode>US</CountryCode>

<PostalCode>01906</PostalCode>

</Address>

</Shipper>

<ShipTo>

<Address>

<City>Saugus</City>

<StateProvinceCode>MA</StateProvinceCode>

<CountryCode>US</CountryCode>

<PostalCode>01906</PostalCode>

</Address>

</ShipTo>

<Package>

<PackagingType>

<Code>03</Code>

</PackagingType>

<PackageWeight>

<UnitOfMeasurement>

<Code>LBS</Code>

</UnitOfMeasurement>

<Weight>13</Weight>

</PackageWeight>

<PackageServiceOptions>

<InsuredValue>

<CurrencyCode>USD</CurrencyCode>

<MonetaryValue>180.00</MonetaryValue>

</InsuredValue>

</PackageServiceOptions>

</Package>

</Shipment>

<CustomerClassification>

<Code>03</Code>

</CustomerClassification>

</RatingServiceSelectionRequest>

 

Error from cURL: Error [28]: connect() timed out!

UPS RESPONSE:

 

I am not getting any response from UPS and Curl is enabled on my server at startlogic. Any ideas?

Edited by Jan Zonjee
Link to comment
Share on other sites

Error from cURL: Error [28]: connect() timed out!

UPS RESPONSE:

 

I am not getting any response from UPS and Curl is enabled on my server at startlogic. Any ideas?

I think this was the typical message you got when you are on a GoDaddy account, that uses a proxy server for the https connections. There are directions in the readme.txt to solve that (step 12). If you are not a GoDaddy user, ask your hosting provider about this curl problem. It is not something that can be solved by changing something in the UPSXML contribution.

Link to comment
Share on other sites

I am getting an error message:

If you prefer to use UPS as your shipping method, please contact ...

 

Any ideas? I tried the upsxml.log however, it is blank. I uncommented this line:

$this->logfile = '/srv/www/htdocs/catalog/includes/modules/shipping/upsxml.log';

 

 

Thanks.

Edited by rex64
Link to comment
Share on other sites

Is that the complete text of the message? Did you enable the log by setting the file path in upsxml.php and uncommenting the line? Has this ever worked for you before?

Link to comment
Share on other sites

I uncommented this line:

$this->logfile = '/srv/www/htdocs/catalog/includes/modules/shipping/upsxml.log';

And is that the correct path on the server this is on? Compare with your configure.php for full path (like in the admin for FS_ADMIN I think it is called.

Link to comment
Share on other sites

The complete message is:

United Parcel Service United Parcel Service

:

If you prefer to use UPS as your shipping method, please contact Wallflower Kids via Email.

 

I uncommented this line:

$this->logfile = '/srv/www/htdocs/catalog/includes/modules/shipping/upsxml.log';

 

Is that the complete text of the message? Did you enable the log by setting the file path in upsxml.php and uncommenting the line? Has this ever worked for you before?

 

 

Edit:

Ahh, I think I see what you mean. Can I just use a relative path like this maybe: upsxml.log

Edited by rex64
Link to comment
Share on other sites

Ahh, got it working with the full path (d:\intetpub...). Also, here is my log. I noticed that the state was wrong, even though I have it correct on the module settings. Also, it complains about my certificate or something?

 

------------------------------------------
DATE AND TIME: 2008-02-13 11:39:28
UPS URL: https://www.ups.com:443/ups.app/xml/Rate
UPS REQUEST: <?xml version="1.0"?>
<AccessRequest xml:lang="en-US">
  <AccessLicenseNumber>(PRIVATE)</AccessLicenseNumber>
  <UserId>------</UserId>
  <Password>(PRIVATE)</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>06</Code>
  </PickupType>
  <Shipment>
   <Shipper>
	   <Address>
		   <City>Chesterfield</City>
		   <StateProvinceCode>MO</StateProvinceCode>
		   <CountryCode>US</CountryCode>
		   <PostalCode>63005</PostalCode>
	   </Address>
   </Shipper>
   <ShipTo>
	   <Address>
		   <City>Manchester</City>
		   <StateProvinceCode>AL</StateProvinceCode>
		   <CountryCode>US</CountryCode>
		   <PostalCode>63011</PostalCode>
<ResidentialAddressIndicator/>
	   </Address>
   </ShipTo>
   <Package>
	   <PackagingType>
		   <Code>02</Code>
	   </PackagingType>
	   <PackageWeight>
		   <UnitOfMeasurement>
			   <Code>LBS</Code>
		   </UnitOfMeasurement>
		   <Weight>66</Weight>
	   </PackageWeight>
	   <PackageServiceOptions>
		   <InsuredValue>
			   <CurrencyCode>USD</CurrencyCode>
			   <MonetaryValue>800.00</MonetaryValue>
		   </InsuredValue>
	   </PackageServiceOptions>
   </Package>
  </Shipment>
  <CustomerClassification>
   <Code>03</Code>
  </CustomerClassification>
</RatingServiceSelectionRequest>

Error from cURL: Error [60]: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
UPS RESPONSE:

 

The complete message is:

United Parcel Service United Parcel Service

:

If you prefer to use UPS as your shipping method, please contact Wallflower Kids via Email.

 

I uncommented this line:

$this->logfile = '/srv/www/htdocs/catalog/includes/modules/shipping/upsxml.log';

Edit:

Ahh, I think I see what you mean. Can I just use a relative path like this maybe: upsxml.log

 

Edit: one more thing, this has never worked before

Edited by Jan Zonjee
Link to comment
Share on other sites

Ahh, got it working with the full path (d:\intetpub...). Also, here is my log. I noticed that the state was wrong, even though I have it correct on the module settings. Also, it complains about my certificate or something?

The curl certificate failing is easy to solve. Find around line 667 somewhere in the includes/modules/shipping/upsxml.php:

		} else { // default behavior: cURL is assumed to be compiled in PHP
		$ch = curl_init();
		curl_setopt($ch, CURLOPT_URL, $url);
		// uncomment the next line if you get curl error 60: error setting certificate verify locations
		// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
		// uncommenting the next line is most likely not necessary in case of error 60
		// curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

and do what it says.

 

The AL thing of the state is an error when the customer makes a new account. Normally the page refreshes to select a state but if that goes wrong (don't ask me about the particulars, there is a contribution for it by Steve Lionel I think) the first state in the drop down (Alabama) is inserted. That will trigger UPS errors too.

Edited by Jan Zonjee
Link to comment
Share on other sites

I tried uncommenting one, and then the other. Same error (well actually, a little better):

United Parcel Service United Parcel Service

111285: The postal code 63011 is invalid for AL United States.

If you prefer to use UPS as your shipping method, please contact Wallflower Kids via Email.

 

------------------------------------------
DATE AND TIME: 2008-02-13 14:53:04
UPS URL: https://www.ups.com:443/ups.app/xml/Rate
UPS REQUEST: <?xml version="1.0"?>
<AccessRequest xml:lang="en-US">
  <AccessLicenseNumber>(PRIVATE)</AccessLicenseNumber>
  <UserId>-------</UserId>
  <Password>(PRIVATE)</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>06</Code>
  </PickupType>
  <Shipment>
   <Shipper>
	   <Address>
		   <City>Chesterfield</City>
		   <StateProvinceCode>MO</StateProvinceCode>
		   <CountryCode>US</CountryCode>
		   <PostalCode>63005</PostalCode>
	   </Address>
   </Shipper>
   <ShipTo>
	   <Address>
		   <City>Manchester</City>
		   <StateProvinceCode>AL</StateProvinceCode>
		   <CountryCode>US</CountryCode>
		   <PostalCode>63011</PostalCode>
<ResidentialAddressIndicator/>
	   </Address>
   </ShipTo>
   <Package>
	   <PackagingType>
		   <Code>02</Code>
	   </PackagingType>
	   <PackageWeight>
		   <UnitOfMeasurement>
			   <Code>LBS</Code>
		   </UnitOfMeasurement>
		   <Weight>99</Weight>
	   </PackageWeight>
	   <PackageServiceOptions>
		   <InsuredValue>
			   <CurrencyCode>USD</CurrencyCode>
			   <MonetaryValue>1200.00</MonetaryValue>
		   </InsuredValue>
	   </PackageServiceOptions>
   </Package>
  </Shipment>
  <CustomerClassification>
   <Code>03</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>111285</ErrorCode><ErrorDescription>The postal code 63011 is invalid for AL United States.</ErrorDescription></Error></Response></RatingServiceSelectionResponse>

 

The curl certificate failing is easy to solve. Find around line 667 somewhere in the includes/modules/shipping/upsxml.php:

		} else { // default behavior: cURL is assumed to be compiled in PHP
		$ch = curl_init();
		curl_setopt($ch, CURLOPT_URL, $url);
		// uncomment the next line if you get curl error 60: error setting certificate verify locations
		// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
		// uncommenting the next line is most likely not necessary in case of error 60
		// curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

and do what it says.

 

The AL thing of the state is an error when the customer makes a new account. Normally the page refreshes to select a state but if that goes wrong (don't ask me about the particulars, there is a contribution for it by Jack_mcs I think) the first state in the drop down (Alabama) is inserted. That will trigger UPS errors too.

Edited by Jan Zonjee
Link to comment
Share on other sites

I tried uncommenting one, and then the other. Same error (well actually, a little better):

United Parcel Service United Parcel Service

111285: The postal code 63011 is invalid for AL United States.

No it is not the same error. Your UPSXML module is working fine now. You just need to change the state of the customer you are testing this with in the admin and find the contribution that prevents this kind of errors when opening an account.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...