Jump to content
Supertex

Verifying Compatibility: USPS 7 Sept 2014 Update

Recommended Posts

Just want to make sure I've done this correctly:  

 

I opened includes/modules/shipping/usps.php and changed the following lines: 

      // Connect to the USPS server and retrieve a quote
      $body = '';
      $http = new httpClient();
      if ($http->Connect('production.shippingapis.com', 80)) {
        $http->addHeader('Host', 'production.shippingapis.com');
        $http->addHeader('User-Agent', 'osCommerce');
        $http->addHeader('Connection', 'Close');
        if ($http->Get('/shippingapi.dll?' . $request)) {
          $response = http_chunked_decode( $http->getBody() );
        }
        $http->Disconnect();

substituting  "stg-secure.shippingapis.com" in for "production.shippingapis.com" per this email:

 

 

Hello,

Thank you for using USPS Web Tools.

September 7, 2014 USPS will be implementing changes and additional features to the Web Tools APIs. Detailed release notes are available on the USPS Web Tools home page at www.usps.com/webtools.

The CAT/staging environment is now available to developers for testing using your Web Tools user ID and the following URLs:

To ensure we have the best contact information for you, please take a few moments to complete our four-question contact form by clicking the following link:
Web Tools Customer Contact Form

Please email us at WebTools@usps.gov if you have any issues or questions. You can also reach us on twitter @USPSWebTools for updates and announcements.

Thank you,
USPS Web Tools Program Office

 

I saw no changes either in services offered, or prices pulled, so we're good for another six months?

Share this post


Link to post
Share on other sites

Nope. Based on the last time, USPS said they were instituting the changes they emailed. But then they added several more additional changes without telling us (i.e. 1-Day, 2-Day, 3-Day). Which in turn, broke the module.

 

My main concern is their First-Class Package Service Update, which I hope is limited to international. I'm very confident this USPS update will shatter something in international shipping. Then there's the Length/Width/Height filtering out Flat Rate. And maybe Media/Library Mail if anyone uses those.

This is what I'll probably be doing on Labor Day weekend. ~~ugh

Share this post


Link to post
Share on other sites

Hrm...well then I suppose my next question would be: Is my testing method correct, per above?

Based on the email USPS sent, that seems to be the correct way to test. But it's still heavily reliant on the USPS side being up, running, and accurate with all the stuff they say they're going to do.

Share this post


Link to post
Share on other sites

i am having a nightmare trying to get the USPS to work i keep getting a checkout shipping loop with the new files anyone else have this problem? 

Share this post


Link to post
Share on other sites

I've been testing the latest module on the test server. The good news: First Class Large Envelope and Parcel work for shipments under 13 oz. Media Mail works. The bad news: Nothing else works. No Standard Post. No Priority. No Express.

 

Anybody else see this train wreck happening? Please post any patches if you have them. I'm still trying to find out what is going wrong.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Don't worry Jim there will be a light at the end of the tunnel just watch it is not that bloody train (w00t)

 

Regards

John


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

I knew there had to be some reason for those tracks going into the tunnel....

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

I've got a module working. I think. Please download and test this one. I'm particularly interested in the First Class rates, but it doesn't hurt to test all of them.

 

If you are replacing an existing module, you'll need to replace the module file as usual, and also add includes/classes/http.php. The latter fixes the odd problem with chunked encoding that the USPS claims they aren't using.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Kymation,

 

I'm using one of your previous USPS fixes. Looks like the only thing I lost this round was First Class International.

Share this post


Link to post
Share on other sites

The module in this post is working for all services that I have tested. I'll probably make a couple of small changes and put that up today.

 

Regards

Jim

Edited by kymation

See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Great work as always :thumbsup:

 

Regards

Joli


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

Guess this time it was daylight at the end of the tunnel and not that express train :shifty:

 

Regards

Joli


To improve is to change; to be perfect is to change often.

 

Share this post


Link to post
Share on other sites

Daylight? What's that? Oh, that nasty glare in the sky. Right. :P B)

 

I've uploaded the final version -- see the latest post here. Please install and check it out. The USPS server seems to be up with the latest changes, so the time to update is NOW.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×