USPS retiring Rate V3 Api

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

USPS retiring Rate V3 Api

Post by jmestep » Thu May 08, 2014 10:09 am

Here we go again with the Post Office.
USPS Web Tools will be retiring our RateV3 API later this year (target date: September 28, 2014). We encourage you to upgrade to RateV4 to avoid any disruption in service. For detailed instructions on upgrading to RateV4, please see the RateV4 Transition Guide on the Web Tools site under Web Tools Announcements.

Will this require a change in code?
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
Naveed
Rear Admiral (RADM)
Rear Admiral (RADM)
Posts: 611
Joined: Thu Apr 03, 2008 4:48 am

Re: USPS retiring Rate V3 Api

Post by Naveed » Mon May 12, 2014 4:56 am

Yes, It seems this will require code changes, as we are using Rate V3 API, and we have to update our API to RateV4.

sloDavid
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 92
Joined: Thu Feb 25, 2010 12:34 pm

Re: USPS retiring Rate V3 Api

Post by sloDavid » Thu Jun 05, 2014 12:11 pm

Will there be a hot patch for existing (7.x) versions, or will we need to upgrade to the latest GOLD R-version?

kstevenson
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Thu Jun 03, 2010 1:48 pm

Re: USPS retiring Rate V3 Api

Post by kstevenson » Tue Jun 17, 2014 11:03 am

Could you please let us know if you are going to do a patch for USPS V4 or if we have to fix up the provider ourselves? There are some differences in behavior between V3 and V4 where data sent in the request in V3 works fine but V4 throws errors in the response.

We have not started on porting all our code into Gold yet and the latest source version I have is b5410. I confirmed that it still uses V3. Could you please let me know if you upgraded the provider to use V4 since b5410? We can get the latest source and backport the code if any version of Gold is V4 already.

Could you please let us know?
Karin Stevenson
CyberWolf, Inc.

kstevenson@cyberwolf.com
505-231-3130

User avatar
Shopping Cart Admin
AbleCommerce Admin
AbleCommerce Admin
Posts: 3055
Joined: Mon Dec 01, 2003 8:41 pm
Location: Vancouver, WA
Contact:

Re: USPS retiring Rate V3 Api

Post by Shopping Cart Admin » Tue Jun 17, 2014 11:22 am

Hello,

We've just started investigating this as there wasn't time to get it into the latest release of GOLD. We'll update this thread further as information becomes available from development.
Thanks for your support

Shopping Cart Guru
AbleCommerce.com
Follow us on Facebook

kstevenson
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Thu Jun 03, 2010 1:48 pm

Re: USPS retiring Rate V3 Api

Post by kstevenson » Tue Jun 17, 2014 12:44 pm

Thank you so much! I'll keep an eye on the thread and ask my developer to hold off until we hear from you.
Karin Stevenson
CyberWolf, Inc.

kstevenson@cyberwolf.com
505-231-3130

kstevenson
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Thu Jun 03, 2010 1:48 pm

Re: USPS retiring Rate V3 Api

Post by kstevenson » Tue Jul 22, 2014 1:00 pm

Is there any update on this?

We looked into the code and it seems the main problem is that the functionality for shared packages (more than 1 item in the basket) relies on the USPS V3 behavior to return all options if you send an incorrect container and size values while V4 throws an error instead. Can you give any hint what your approach will be to fix this? We're worried that we get into a crunch having to work with a number of customers for site and shipmethod updates when USPS shuts the V3 API down.

Any update is greatly appreciated.

Thanks in advance,
Karin Stevenson
CyberWolf, Inc.

kstevenson@cyberwolf.com
505-231-3130

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: USPS retiring Rate V3 Api

Post by Katie » Tue Jul 22, 2014 3:50 pm

Hello Karin,

Do you get a specific error? If you can get that for me, then I might be able to help. We have V4 working in Gold. I am in the process of testing it now.

Earlier this week, we sent out a notice concerning end of life for AbleCommerce 7. I'm sorry, but we need to allocate our resources towards the future instead of the past. We do plan on releasing the 7.0.x source for USPS to anyone with a current subscription. We understand that upgrading can be difficult when a site has been customized. Perhaps someone will want to update USPS and release it...
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: USPS retiring Rate V3 Api

Post by jmestep » Wed Jul 23, 2014 6:09 am

Katie, do you have a target release date for the patch for 7 and Gold? People are getting anxious.
Thanks
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

kstevenson
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Thu Jun 03, 2010 1:48 pm

Re: USPS retiring Rate V3 Api

Post by kstevenson » Wed Jul 23, 2014 6:43 am

Hi Katie,

The USPS an error about an invalid container type. I don't have the exact error (need to get with the developer). We don't need a patch for 7.0.7, just the fix that you are doing for V4 because we have done a different fix than you guys for the last USPS issue to make it more maintainable for our publishers. So, we'll just merge this one for V4 into our customized source. Since Gold and 7.0.7 are pretty similar, if not the same, for the USPS provider, we don't care which one we get as long as it's soon :-).
Karin Stevenson
CyberWolf, Inc.

kstevenson@cyberwolf.com
505-231-3130

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: USPS retiring Rate V3 Api

Post by Katie » Wed Jul 23, 2014 7:25 am

We had some trouble with the container type as well. This is the only note I could find:
Some notes about RateV4 API:

For a REGULAR sized package, the container type is totally ignored. The only case where the container type has any effect is when the package size is LARGE. For the LARGE size package the container type will be either RECTANGULAR/NONRECTANGULAR or VARIABLE.

Therefore, In our current implementation, the container options Flat Rate Box and Flat Rate Envelope do absolutely nothing to the quote as they are totally ignored.
Concerning AC7 and USPS...we were not planning on updating the API. That is sort of why we sent out a notice last week saying that AC7 has come to the end of its life. However, once we get Gold and the USPS patches for older versions of Gold released, then we will try to do something for AC7. Keep in mind that it has been over 3 years now since 7.07 was released. Our development resources are being pushed to the limit when we keep having to produce patches for version 7. I just cannot make any guarantees right now as to when we can do something for version 7.

We have to get the Gold releases done first, and then we will try to work on version 7 before the deadline in Sept. We anticipate releasing Gold R9 in the first weeks of Sept. It depends on how long the QA cycles takes to complete. The features should be wrapped up my mid August, and then we can start testing and have a better idea of the release date.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

kstevenson
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Thu Jun 03, 2010 1:48 pm

Re: USPS retiring Rate V3 Api

Post by kstevenson » Wed Jul 23, 2014 8:36 am

Katie,

Could you possibly provide the source change snippets you are doing before that? August/September is cutting it way too close for comfort. I'm going to be gone the first half of September, to boot.

The current USPS provider implemenation is coded to always send "FLAT RATE ENVELOPE" and "REGULAR" when you have multiple items in the basket and that causes the error when the weight is too high. I am mostly trying to figure out how you are handling the Container Type and Size selection with shared packages. We've been looking into 3D Bin calculations for accurate dimensions for container selection but it's a pain in the neck to say the very least. And if you send Variable, you set everything back and customer might see 3 different flatbox rates during checkout which is, of course, not acceptable. So, I am really interested in seeing what you're doing for the issue. If necessary, of course, you can contact me via my email directly.

Thanks again for your help!
Karin Stevenson
CyberWolf, Inc.

kstevenson@cyberwolf.com
505-231-3130

User avatar
calvis
Rear Admiral (RADM)
Rear Admiral (RADM)
Posts: 710
Joined: Tue Jan 27, 2004 3:57 pm
Location: Redmond, WA

Re: USPS retiring Rate V3 Api

Post by calvis » Wed Jul 23, 2014 9:40 am

Katie wrote:Concerning AC7 and USPS...we were not planning on updating the API. That is sort of why we sent out a notice last week saying that AC7 has come to the end of its life.
We never got such a notice. At least I can't find it.
Able Customer Since 1999 Currently Running on GOLD R12 SR1 and PCI Certified.

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Re: USPS retiring Rate V3 Api

Post by compunerdy » Wed Jul 23, 2014 10:16 am

I never got a notice either..

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: USPS retiring Rate V3 Api

Post by Katie » Wed Jul 23, 2014 3:15 pm

Are you guys signed up for the mailing lists? You can go to the account profile page and do that. I will check with Mike and ask him to post more notices concerning AC7.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
calvis
Rear Admiral (RADM)
Rear Admiral (RADM)
Posts: 710
Joined: Tue Jan 27, 2004 3:57 pm
Location: Redmond, WA

Re: USPS retiring Rate V3 Api

Post by calvis » Wed Jul 23, 2014 3:25 pm

subscribed_to.jpg
Yep it looks like it.
Able Customer Since 1999 Currently Running on GOLD R12 SR1 and PCI Certified.

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: USPS retiring Rate V3 Api

Post by Katie » Wed Jul 23, 2014 4:34 pm

You should have received it. I'm not in charge of the mailings, so let me check to make sure you are on the list we are using.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

User avatar
NC Software
AbleCommerce Partner
AbleCommerce Partner
Posts: 4620
Joined: Mon Sep 13, 2004 6:06 pm
Contact:

Re: USPS retiring Rate V3 Api

Post by NC Software » Wed Jul 23, 2014 4:45 pm

Oh I love the End of Life discussion. Windows XP is EOL and no one at Microsoft uses it. However.... I digress :)

For these things you guys really should consider posting the source on one of the social code sharing networks wherever as there are several. Empower your devs to work for you on these things, merge in their updates and then you can publish them or make it available (ala FedEx I suppose). Let people fork off your source, make changes, then you can merge them back in. Done.

AC 7.0.7 is far from end of life....and the fact is people don't want to move to Gold (yet) so you really should keep it going, if not for YOURSELF :)
Neal Culiner
NC Software, Inc.

User avatar
compunerdy
Admiral (ADM)
Admiral (ADM)
Posts: 1283
Joined: Sun Nov 18, 2007 3:55 pm

Re: USPS retiring Rate V3 Api

Post by compunerdy » Wed Jul 23, 2014 7:01 pm

If nothing else do the updates and only make them available for current subscribers.. gold or otherwise. I have been paying for Gold since it came out and have kept a current license pretty much since 2007. You gave V7 a pretty short lifespan and then changed so much when going to Gold, I think the least you can do is keep major systems functioning in v7 so people have more time...

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: USPS retiring Rate V3 Api

Post by Katie » Wed Jul 23, 2014 8:13 pm

I was thinking along those same lines Tim. Once testing is completed, I will see if we can merge the changes for version 7 and provide the update for subscription holders, and make it a paid update for non-subscription holders.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

kstevenson
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Thu Jun 03, 2010 1:48 pm

Re: USPS retiring Rate V3 Api

Post by kstevenson » Thu Jul 24, 2014 5:46 am

Katie,

I'll be happy to take the code before you're done testing. We'll need to do our own QA anyway and can help with the validation as a second set of eyes.

And, btw, not that it matters but we got no notification last week either. I only knew about it due to the notification that was sent out last year. I don't know which email list that was sent to but I was not on it.
Karin Stevenson
CyberWolf, Inc.

kstevenson@cyberwolf.com
505-231-3130

rmaweb
Commander (CMDR)
Commander (CMDR)
Posts: 118
Joined: Fri Sep 10, 2010 9:41 am

Re: USPS retiring Rate V3 Api

Post by rmaweb » Thu Jul 24, 2014 7:12 am

Just piping in my 2 cents so that Katie doesn't feel like she's losing her mind, I did receive the July Ablecommerce FYI email sent on July 17th.
Ryan A.
Scott's Bait and Tackle
http://store.scottsbt.com
Work In Progress
Able Gold R10
Bootstrap 3.3

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: USPS retiring Rate V3 Api

Post by Katie » Thu Jul 24, 2014 7:17 am

Just piping in my 2 cents so that Katie doesn't feel like she's losing her mind, I did receive the July Ablecommerce FYI email sent on July 17th.
Oh Thank You!!! I was starting to think we sent that email to a bunch of strangers...
I'll be happy to take the code before you're done testing. We'll need to do our own QA anyway and can help with the validation as a second set of eyes.
Karin, you are too kind :) I am working with the dev team to get you what you need. It will probably be about a week though...so early August which is right around the corner.

I will still try to figure out what is wrong with the email list. We may end up sending it again...
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

kstevenson
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 47
Joined: Thu Jun 03, 2010 1:48 pm

Re: USPS retiring Rate V3 Api

Post by kstevenson » Thu Jul 24, 2014 7:38 am

Karin, you are too kind I am working with the dev team to get you what you need. It will probably be about a week though...so early August which is right around the corner.
Thanks, Katie, pure self interest is ruling on my end. :-) We've been exploring a bunch of options to work around the problem, so seeing what the rest of the AbleCommerce world is going to get is very helpful.

Thanks again and I hope you have a grand weekend.
Karin Stevenson
CyberWolf, Inc.

kstevenson@cyberwolf.com
505-231-3130

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: USPS retiring Rate V3 Api

Post by Katie » Sat Jul 26, 2014 8:51 pm

THESE ARE THE SOURCE CODE CHANGES FOR VERSION 7:

Following updates needed inside BuildProviderRequest method in USPS.cs:

Locate:

Code: Select all

string _requestXml = string.Format("<?xml version=\"1.0\"?><RateV3Request USERID=\"{0}\"></RateV3Request>",this.UserId);
and replace with:

Code: Select all

string _requestXml = string.Format("<?xml version=\"1.0\"?><RateV4Request USERID=\"{0}\"></RateV4Request>",this.UserId);
Locate:

Code: Select all

//For International rate requests ounces weight should also be integer value
int ounces = (int)(package.Weight - (pounds * 16));
and replace with:

Code: Select all

//For International rate requests ounces weight should also be integer value
int ounces = (int)(package.Weight - (pounds * 16));

//SET THE CONTAINER TO RECTANGULAR/NONRECTANGULAR WHEN PACKAGE SIZE IS LARGE AND VARIABLE WHEN SIZE IS REGULAR
//CONTAINER TYPE IS RECTANGULAR WHEN PACKAGE SIZE IS LARGE AND DIMENSIONS GREATER THAN ZERO OTHERWISE NONRECTANGULAR
string containerValue = null;
if (GetContainerValue(package) == "FLAT RATE ENVELOPE" || GetContainerValue(package) == "FLAT RATE BOX" || GetContainerValue(package) == "VARIABLE")
{
  if (GetPackageSizeValue(package) == "LARGE" && package.Length > 0 && package.Width > 0 && package.Height > 0)
  {
    containerValue = "NONRECTANGULAR";
  }
  else if (GetPackageSizeValue(package) == "REGULAR")
  {
    containerValue = "VARIABLE";
  }
  else
  {
    containerValue = "RECTANGULAR";
  }
}
Locate:

Code: Select all

XmlUtility.SetElementValue(packageElement, "Container", GetContainerValue(package));
and replace with:

Code: Select all

XmlUtility.SetElementValue(packageElement, "Container", containerValue);
Similarly, locate the following line of code inside GetAllProviderShipRateQuotes method

Code: Select all

//SEND THIS REQUEST TO THE PROVIDER
XmlDocument providerResponse = SendRequestToProvider(providerRequest, domestic ? "RateV3" : "IntlRate");
and replace with:

Code: Select all

//SEND THIS REQUEST TO THE PROVIDER
XmlDocument providerResponse = SendRequestToProvider(providerRequest, domestic ? "RateV4" : "IntlRate");
These are the only changes required for USPS RateV4.

TESTING IS STILL IN PROGRESS. THE CHANGES ABOVE HAVE NOT PASSED FINAL QA.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

Post Reply