Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

upsxml 1.3.5 issues


maddrummer
 Share

Recommended Posts

I'm pretty sure the contribution is installed correctly, but when i go to checkout , i get this message "This module supports only xpci version 1.0001 of the UPS Rates Interface. Please contact the webmaster for additional assistance.

If you prefer to use UPS as your shipping method, please contact mystore via email." I've done a search of the forum for this, but found no solutions. Any takers?

Link to comment
Share on other sites

I'm pretty sure the contribution is installed correctly, but when i go to checkout , i get this message "This module supports only xpci version 1.0001 of the UPS Rates Interface. Please contact the webmaster for additional assistance.

If you prefer to use UPS as your shipping method, please contact mystore via email." I've done a search of the forum for this, but found no solutions. Any takers?

Very peculiar error because it would mean not a single shop using upsxml would work anymore.

It is generated by this part in the function _parseResult($xmlResult) that starts around line 740 in the shipping module upsxml.php:

		// Get version. Must be xpci version 1.0001 or this might not work.
	$responseVersion = $doc['RatingServiceSelectionResponse']['Response']['TransactionReference']['XpciVersion'];
	if ($this->xpci_version != $responseVersion) {
		$message = MODULE_SHIPPING_UPSXML_RATES_TEXT_COMM_VERSION_ERROR;
		return $message;
	}

You could comment it out because it is not really an integral part of the module but I suspect there is something different going on.

If you set up logging of the request and reply (see that file around line 110) you can check things:

		// to enable logging, create an empty "upsxml.log" file at the location you set below, give it write permissions (777) and uncomment the next line
//		$this->logfile = '/srv/www/htdocs/catalog/includes/modules/shipping/upsxml.log';

Then try again and see if the version is now 1.0002 for the rates request.

Then change it accordingly in line 94:

$this->xpci_version = '1.0001';

Link to comment
Share on other sites

Very peculiar error because it would mean not a single shop using upsxml would work anymore.

It is generated by this part in the function _parseResult($xmlResult) that starts around line 740 in the shipping module upsxml.php:

		// Get version. Must be xpci version 1.0001 or this might not work.
	$responseVersion = $doc['RatingServiceSelectionResponse']['Response']['TransactionReference']['XpciVersion'];
	if ($this->xpci_version != $responseVersion) {
		$message = MODULE_SHIPPING_UPSXML_RATES_TEXT_COMM_VERSION_ERROR;
		return $message;
	}

You could comment it out because it is not really an integral part of the module but I suspect there is something different going on.

If you set up logging of the request and reply (see that file around line 110) you can check things:

		// to enable logging, create an empty "upsxml.log" file at the location you set below, give it write permissions (777) and uncomment the next line
//		$this->logfile = '/srv/www/htdocs/catalog/includes/modules/shipping/upsxml.log';

Then try again and see if the version is now 1.0002 for the rates request.

Then change it accordingly in line 94:

$this->xpci_version = '1.0001';

Very strange... when I comment out function _parseResult($xmlResult), a colon shows up??? Going to try the log file now. Maybe it will shed some light on the situation at hand.

Link to comment
Share on other sites

Can you post it here (after editiing out any sensitive information)?

 

You shouldn't comment out the whole function, just the part that looks for the version.

here it goes

------------------------------------------
DATE AND TIME: 2008-09-06 13:11:48
UPS URL: https://www.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>ROCKY MOUNT</PoliticalDivision2>
	   <PoliticalDivision1>NC</PoliticalDivision1>
	   <CountryCode>US</CountryCode>
	   <PostcodePrimaryLow>27801</PostcodePrimaryLow>
   </AddressArtifactFormat>
  </TransitFrom>
  <TransitTo>
   <AddressArtifactFormat>
	   <PoliticalDivision2>vanceboro</PoliticalDivision2>
	   <PoliticalDivision1>NC</PoliticalDivision1>
	   <CountryCode>US</CountryCode>
	   <PostcodePrimaryLow>28586</PostcodePrimaryLow>
	   <PostcodePrimaryHigh>28586</PostcodePrimaryHigh>
   </AddressArtifactFormat>
  </TransitTo>
  <ShipmentWeight>
   <UnitOfMeasurement>
	   <Code>LBS</Code>
   </UnitOfMeasurement>
   <Weight>0</Weight>
  </ShipmentWeight>
  <InvoiceLineTotal>
   <CurrencyCode>USD</CurrencyCode>
   <MonetaryValue>19</MonetaryValue>
  </InvoiceLineTotal>
  <PickupDate>20080908</PickupDate>
</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>2008-09-08</PickupDate><TransitFrom><AddressArtifactFormat><PoliticalDivision2>ROCKY MOUNT</PoliticalDivision2><PoliticalDivision1>NC</PoliticalDivision1><Country>UNITED STATES</Country><CountryCode>US</CountryCode><PostcodePrimaryLow>27801</PostcodePrimaryLow></AddressArtifactFormat></TransitFrom><TransitTo><AddressArtifactFormat><PoliticalDivision2>VANCEBORO</PoliticalDivision2><PoliticalDivision1>NC</PoliticalDivision1><Country>UNITED STATES</Country><CountryCode>US</CountryCode><PostcodePrimaryLow>28586</PostcodePrimaryLow></AddressArtifactFormat></TransitTo><InvoiceLineTotal><CurrencyCode>USD</CurrencyCode><MonetaryValue>19.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 the 48 contiguous states, except for any ground package originating in Alaska or Hawaii. In addition, the guarantee applies to shipments from Puerto Rico to the 48 contiguous states. See Terms and Conditions in the Service Guide for details.</Disclaimer><ServiceSummary><Service><Code>1DA</Code><Description>UPS Next Day Air</Description></Service><Guaranteed><Code>Y</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>1</BusinessTransitDays><Time>23:00:00</Time><PickupDate>2008-09-08</PickupDate><Date>2008-09-09</Date><DayOfWeek>TUE</DayOfWeek></EstimatedArrival></ServiceSummary><ServiceSummary><Service><Code>GND</Code><Description>UPS Ground</Description></Service><Guaranteed><Code>Y</Code></Guaranteed><EstimatedArrival><BusinessTransitDays>1</BusinessTransitDays><Time>23:00:00</Time><PickupDate>2008-09-08</PickupDate><Date>2008-09-09</Date><DayOfWeek>TUE</DayOfWeek></EstimatedArrival></ServiceSummary><MaximumListSize>35</MaximumListSize></TransitResponse></TimeInTransitResponse>
------------------------------------------
Time in Transit: 0
------------------------------------------
DATE AND TIME: 2008-09-06 13:11:50
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>
	 <ShipperNumber>*********</ShipperNumber>
	   <Address>
		   <City>ROCKY MOUNT</City>
		   <StateProvinceCode>NC</StateProvinceCode>
		   <CountryCode>US</CountryCode>
		   <PostalCode>27801</PostalCode>
	   </Address>
   </Shipper>
   <ShipTo>
	   <Address>
		   <City>vanceboro</City>
		   <StateProvinceCode>NC</StateProvinceCode>
		   <CountryCode>US</CountryCode>
		   <PostalCode>28586</PostalCode>
<ResidentialAddressIndicator/>
	   </Address>
   </ShipTo>
   <Package>
	   <PackagingType>
		   <Code>02</Code>
	   </PackagingType>
	   <PackageWeight>
		   <UnitOfMeasurement>
			   <Code>LBS</Code>
		   </UnitOfMeasurement>
		   <Weight>9</Weight>
	   </PackageWeight>
	   <PackageServiceOptions>
		   <InsuredValue>
			   <CurrencyCode>USD</CurrencyCode>
			   <MonetaryValue>19.00</MonetaryValue>
		   </InsuredValue>
	   </PackageServiceOptions>
   </Package>
   <RateInformation>
	 <NegotiatedRatesIndicator/>
   </RateInformation>
  </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>1</ResponseStatusCode><ResponseStatusDescription>Success</ResponseStatusDescription></Response><RatedShipment><Service><Code>03</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>9.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>10.66</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>10.66</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery></GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>10.66</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>10.66</MonetaryValue></TotalCharges><Weight>9.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>9.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>12</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>9.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>17.96</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>17.96</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>3</GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>17.96</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>17.96</MonetaryValue></TotalCharges><Weight>9.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>9.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>02</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>9.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>22.06</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>22.06</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>2</GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>22.06</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>22.06</MonetaryValue></TotalCharges><Weight>9.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>9.0</Weight></BillingWeight></RatedPackage></RatedShipment><RatedShipment><Service><Code>01</Code></Service><RatedShipmentWarning>Your invoice may vary from the displayed reference rates</RatedShipmentWarning><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>9.0</Weight></BillingWeight><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>40.35</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>40.35</MonetaryValue></TotalCharges><GuaranteedDaysToDelivery>1</GuaranteedDaysToDelivery><ScheduledDeliveryTime></ScheduledDeliveryTime><RatedPackage><TransportationCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>40.35</MonetaryValue></TransportationCharges><ServiceOptionsCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>0.00</MonetaryValue></ServiceOptionsCharges><TotalCharges><CurrencyCode>USD</CurrencyCode><MonetaryValue>40.35</MonetaryValue></TotalCharges><Weight>9.0</Weight><BillingWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>9.0</Weight></BillingWeight></RatedPackage></RatedShipment></RatingServiceSelectionResponse>

Link to comment
Share on other sites

here it goes

I copied and pasted the response you got to a file and used that in upsxml.php using the code around line 632 and it works fine. Also, as you can see, the version UPS sends back is 1.0001.

Perhaps something goes wrong in the reading of the XML. If you are on PHP4 it would use a function (call-time pass by reference) that might error on your server but may not be visible. Just guessing here...

Link to comment
Share on other sites

I think you hit the nail on the head. I was getting those errors. I did some research and deleted the ampersands (which were calling for a specific version of PHP which must not be compatible with my host). Now the big question...is there anyway around the PHP 4 issue?

Link to comment
Share on other sites

I think you hit the nail on the head. I was getting those errors. I did some research and deleted the ampersands (which were calling for a specific version of PHP which must not be compatible with my host). Now the big question...is there anyway around the PHP 4 issue?

I don't follow you here, with the ampersands calling for a specific version of PHP. If you mean you changed that in xmp.php then I think it won't work anymore (see the site of the author of that class, section Notes).

Link to comment
Share on other sites

  • 2 months later...

hi, i'm a little new to the forum. essentially, this thread was the closest i have come to finding answers addressing this problem. i am having the exact same issue as maddrummer, but i have tried all these fixes, the version change, commenting out the function to get the version, everything else on the forum. i am still completely lost and unable to use any part of this supposedly great module. i will take any idea, or try anything!!!

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.

 Share

×
×
  • Create New...