Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Usps Is Aboutto Make Changes Again. Rate Topic   - - - - -

 
  • dsdewitt
  • Member
  • Members
  • Join Date: 19-Mar 09
  • 291 posts

Posted 07 May 2015 - 02:20 PM #1

I received this email about upcoming change slated for May 31.

My brief looking at it has me worried about one item " Origin ZIP Code required for Priority Mail International to Canada" . I am using cs-caart 2.1.1 and have had changes made each time the post office makes changes, some easy some not. Does anyone know if this change will affect my cart?

Here is the email: ( the web tools home page link seems to have more info)
thanks, David DeWitt


Hello,
Thank you for using USPS Web Tools.
May 31, 2015 USPS Web Tools will be implementing modifications and additional features to the U.S. Postal Service APIs. The following changes may especially impact shipping systems:
  • Origin ZIP Code required for Priority Mail International to Canada
  • Modified special services
  • Modified service IDs
  • Modified available mail classes for Merchandise Return Services
Detailed release notes are available on the Web Tools home page at USPS.com/webtools under the Web Tools Announcements section. Included in the release notes are the URLs of the staging environments, which are now available to developers for testing.
To receive future Web Tools updates, follow us on Twitter @USPSWebTools. If you have any questions, encounter any issues, or have any feedback, please let us know by simply replying to this email.
Thank you,
USPS Web Tools Program Office
David DeWitt
retail site ver. 2.1.1

 
  • dsdewitt
  • Member
  • Members
  • Join Date: 19-Mar 09
  • 291 posts

Posted 19 May 2015 - 03:49 PM #2

Does anyone understand the changes that USPS is about to make? Maybe using my test site I can test what may happen. The give a test environment url. What file would I need to alter to point it to their test site?

Thanks for any info,
David DeWitt
David DeWitt
retail site ver. 2.1.1

 
  • dsdewitt
  • Member
  • Members
  • Join Date: 19-Mar 09
  • 291 posts

Posted 19 May 2015 - 04:52 PM #3

After some digging around I came up with this.
website.com/shipping/usps.php
has the following lines around line 41
if ($shipping_settings['usps']['test_mode'] == 'Y') {
$url = 'http://testing.shippingapis.com/ShippingAPI.dll'; 
} else {
$url = 'http://production.shippingapis.com/ShippingAPI.dll'; 
}
I made the following changes

 if ($shipping_settings['usps']['test_mode'] == 'Y') {
$url = 'http://stg-production.shippingapis.com/ShippingAPI.dll'; // changed to stg-production. from testing.
} else {
$url = 'http://production.shippingapis.com/ShippingAPI.dll';
}


I changed the admin setting to test mode, then cleared cache. So everything seems to work, but that seemed to easy. So I decided to make the url point to a false address. Cleared the cache and everything still worked perfect. also cleared browser cache. So I concluded that this is not where to make the changes.

Then I thought maybe the test mode is not functional, so I altered the production url above, cleared caches, etc.. everything still worked. Seems strange, if I leave everything alone, something goes wrong, but if I try to break it, nothing goes wrong.


Does anyone have a better idea?

thanks,
David DeWitt
David DeWitt
retail site ver. 2.1.1

 
  • dsdewitt
  • Member
  • Members
  • Join Date: 19-Mar 09
  • 291 posts

Posted 19 May 2015 - 08:17 PM #4

Well us domestic rates are coming in. so I see in the logs. and from a test user. From logs I see that I am sending to the correct url.

Now the strange thing is, if my test user is out of country ( lets say Ireland) the test user get rates back, but the log only shows the rate request, no rate response. I see from the usps.php file that I am not using IntlRateV2 API. As I started test with it I seem to receive errors. sample request and response:
URL: http://stg-production.shippingapis.com/ShippingAPI.dll
Request: array ( 'API' => 'IntlRateV2', 'XML' => ' <IntlRateV2Request USERID="Yippie"> <Package ID="0"> <Pounds>0</Pounds> <Ounces>5</Ounces> <MailType>package</MailType> <Country>Ireland</Country> </Package> </IntlRateV2Request>', )
Response: <?xml version="1.0" encoding="UTF-8"?> <Error><Number>-2147221202</Number><Source>Common:XmlParse</Source><Description>The element 'Package' has invalid child element 'Country'. List of possible elements expected: 'GXG, ValueOfContents'.</Description><HelpFile/><HelpContext/></Error>

Thanks for any help,
David DeWitt
David DeWitt
retail site ver. 2.1.1

 
  • dsdewitt
  • Member
  • Members
  • Join Date: 19-Mar 09
  • 291 posts

Posted 05 June 2015 - 03:49 PM #5

After much tinkering, I have got it all working. us domestic, international 1st class and priority. both Canada and other countries.

I think most of my problem was in USPS parsing of the XML data.
David DeWitt
retail site ver. 2.1.1

 
  • Magpie Don
  • Senior Member
  • Members
  • Join Date: 01-Apr 09
  • 813 posts

Posted 05 June 2015 - 06:16 PM #6

Congratulations!
I can confirm that for CS-Cart v3 and v4 the test URL needs to be updated in the usps.php script, but that's all. And the test URL does not seem to be used when testing shipping methods thru the CS-Cart interface. Not once did I find a HTTP request to the test URL when testing the different shipping methods to domestic or international destinations.
I wish CS-Cart would include a "test address" selection on the Shipping Method configuration screen where the method is tested. Changing the Settings>General>Default Location back and forth between foreign and domestic so you can test shipping methods is kind of silly.

CS-Cart Ultimate ver 4.3.5


 

Posted 05 June 2015 - 07:18 PM #7

I'm on 4.2.4 do I need to make any changes?