Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Verifying Compatibility: USPS 7 Sept 2014 Update


Supertex

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 [email protected] 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?

Link to comment
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

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

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...