Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

USPS Shipping Error


Chris Dunning

Recommended Posts

I've seen this one many times -

Iv'e added the Shipping Module that is included in the default install of osCommerce. Added the USPS userid and password but when checking out it's gives the following error.

 

"An error occured with the USPS shipping calculations.

If you prefer to use USPS as your shipping method, please contact the store owner."

 

Tried to switch to production server of USPS but same message. How can I test and see what is going on and maybe test the userid/password I received.

 

Thanks.

 

99% of the time, this is the solution:

 

I am having the same problem. I beleive it can be resolved by calling the phone number that was included in your registration email from USPS. Until you call and activate your access to the production server, you will get that error.

 

I believe this is the current phone number for USPS:

800-344-7779

Chris Dunning

osCommerce, Contributions Moderator Team

 

Please do not send me PM! I do not read or answer these often. Use the email button instead!

 

I do NOT support contributions other than my own. Emails asking for support on other people's contributions will be ignored. Ask in the forum or contact the contribution author directly.

Link to comment
Share on other sites

  • 1 month later...

99% of the time, it's actually that the store owner hasn't put in their zip code in the SHIPPING category in OS Commerce ADMIN.

Link to comment
Share on other sites

  • 1 month later...

I got this error when I selected the TEST server in the admin. I found that the OSCommerce was sending the something like the following to the TEST server:

<RateRequest USERID="myID" PASSWORD="mypassword">

<Package ID="0">...

</Package>

<Package ID="1">...

</Package>

<Package ID="2">...

</Package>

</RateRequest>

 

This would seem to be violating USPS input to the test server, since their publication states that there are only 7 unique valid test requests with 7 corresponding responses.

 

I typed the request in the web browser to test, what they call "canned test" and got the correct replies. This tells me that there is nothing weird with the connection and password and ID. I then requested the LIVE server activation by calling USPS. After, that, OScommerce seem to work well.

Link to comment
Share on other sites

  • 2 months later...

I had the same problem.

 

First, make sure that you are registered with USPS webtools first (which I'm sure you are).

 

Then you need to make sure that the server in your shipping module settings is set on "production", not "test."

 

Then you need to call USPS web support (it only takes a minute) @ 1-800-344-7779 (i think that's the #) and have then switch you from "test" to "production" on their server. They told me that anyone who signs up with USPS webtools is required to start out on their server as test since most people don't have a service provider already set up (we have oscommerce).

 

as soon as i was of the phone, it worked!

 

Hope this helps.

Link to comment
Share on other sites

  • 5 months later...

I too am having the error as quoted above. I do have a USPS account so I logged in and went to the webtools. Sure enough, just as described I have to active the API and then request to have it set to production mode.

 

Thanks folks, this thread took me from baffled to fixed in less than 1 hour- pretty good I'd say.

Link to comment
Share on other sites

OK, let me follow up with how I fixed my USPS shipping error problem:

 

I first got the typical error in checkout that said there was a problem with USPS shipping and to contact the site owner.

 

From here,

1) I read this post then went to USPS.com to enable webtools

2) Recieved a confirmation from USPS

3) Sent another email to USPS requesting my API to be set to Production

3) ensured that all my zip codes and such were entered correctly throught the OScommerce control panel

 

4) HERE IS THE KICKER! WHEN I SIGNED UP FOR USPS WEBTOOLS THEy GAVE ME A NEW USERNAME AND PASSWORD WHICH IS DIFFERENT from your standard USPS loging and password. Be sure

you enter this new API username and PW in the OSC usps shipping module.

 

I also had set the "shipping zone" in the bottom of the edit USPS module to my state which I believe was limiting service, once I cleared this value the module started working for me.

 

Also note that I used ANYEDIT to check the USPS.PHP file to assure it pointed to the Production API at the USPS server and it was correct. You should not need to make any modifications to the USPS.PHP.

-You must have a USPS account

-You must then have USPS enable "webtools"

-You must request USPS to set your API to Production

-You must use the API specific USPS issued username and password in your OSC shipping module

 

I know there are several different USPS shipping issues, this one happened to me at initial setup. I hope this is helpful information.

Link to comment
Share on other sites

another thing to note that when i signed up and started testing my usps i never got the test server to work right.

 

as i called usps on the phone about this, the gentleman there could read off a list everytime i sent info to the test server. the usps test server received all my tests correctly but never sent any info back to me- and i only got errors.

 

searching various internet forums i learned that this is known issue by many that oscommerce cart does not work well with usps test server.

 

the usps rep told me everything was working well- even if i didn't know it- then set me up to the production. so if you are getting errors with the test server it might be faulty info you are reading. call usps. they will know for sure if your tests are valid.

Link to comment
Share on other sites

  • 2 weeks later...

Hi there. In case USPS won't switch you to the production server, you can use this bit of PHP code to show them you've successfully tested their API on their test server with your software. It requires that PHP and cURL be installed on your server. (Presumably you have PHP b/c you are using OSCommerce, and likely cURL is on - go ahead and try it b/c it won't hurt).

 

So, save this code as a new PHP file, upload it to your server, and enter the URL for it in your browser. It simply connects to the USPS dll, submits the required XML, and reports the XML returned in your browser. You'll likely get an error message, but as long as they see you've successfully submitted your username and password and also read the response it should work out.

 

Don't forget to change the username and password to the one you received when you signed up with USPS.

 

Cheers!

 

 

<?php

//enter your username and password

$username = "YourUSPSUsername";

$password = "YourUSPSPassword";

 

$data_string = "API=RateV2&XML=<RateV2Request USERID=\"$username\" PASSWORD=\"$password\"><Package ID=\"0\"><Service>All</Service><ZipOrigination>05489</ZipOrigination><ZipDestination>68506</ZipDestination><Pounds>3</Pounds><Ounces>2</Ounces><Size>REGULAR</Size><Machinable>TRUE</Machinable></Package></RateV2Request>";

// Get a CURL handle

$curl_handle = curl_init ();

// Tell CURL the URL of the recipient script

curl_setopt ($curl_handle, CURLOPT_URL, 'http://testing.shippingapis.com/ShippingAPITest.dll');

// This section sets various options. See http://www.php.net/manual/en/function.curl-setopt.php

curl_setopt ($curl_handle, CURLOPT_FOLLOWLOCATION, 1);

curl_setopt ($curl_handle, CURLOPT_RETURNTRANSFER, 1);

curl_setopt ($curl_handle, CURLOPT_POST, 1);

curl_setopt ($curl_handle, CURLOPT_POSTFIELDS, $data_string);

// Perform the POST and get the data returned by the server.

$result = curl_exec ($curl_handle) or die ("There has been a CURL_EXEC error");

// Close the CURL handle

curl_close ($curl_handle);

echo $result;

?>

 

 

 

 

 

 

I've seen this one many times -

99% of the time, this is the solution:

I believe this is the current phone number for USPS:

800-344-7779

Link to comment
Share on other sites

  • 1 year later...

Hello everyone,

 

I sign up with usps web tools and got an E-Mail from them. Base on the E-Mail below look like only provide the User ID? I don't see password?

 

Do I need to contact usps for the password or the password is simply blank?

 

Thanks

 

----- Original Message -----

From: <[email protected]>

To: "Thong Tran" <[email protected]>

Sent: Monday, July 24, 2006 2:29 PM

Subject: Important USPS Web Tool Registration Notice

 

 

> ***** Please DO NOT REPLY to this automated message. Contact information is provided below. *****

>

> Thank you for registering for the U. S. Postal Service's Web Tools Application Program Interfaces (APIs). We are providing you with a User ID that serves multiple purposes, as explained below.

>

> Your Web Tools User ID is: 481VNUNI*******

>

>

> Your Web Tools User ID, shown above, is required to test and integrate USPS Web Tools APIs. With this ID, you may begin sending calls to the test server. Depending on the API, the address to the test server is either http://testing.shippingapis.com/ShippingAPITest.dll or https://secure.shippingapis.com/ShippingAPITest.dll. Use this information in combination with your User ID and your XML string to send a request to the USPS servers. For more details, refer to the programming guides (located at http://www.usps.com/webtools) for the specific API you are integrating.

>

> A sample test request would look like: "http://testing.shippingapis.com/ShippingAPITest.dll?API=[API_Name]&XML=[xml_String_containing_User_ID]"

>

> When you have completed your testing, email the USPS Internet Customer Care Center (ICCC). They will switch your profile to allow you access to the production server and will provide you with the production URLs.

>

> The ICCC is staffed from 7:00AM to 11:00PM Eastern Time.

>

> E-mail: [email protected]

> Telephone: 1-800-344-7779

>

> The latest versions of the technical documentation, including the Administrative Guide, are available from USPS.com at http://www.usps.com/webtools. This documentation provides the information you will need to utilize our APIs. It is available in both PDF and HTML formats. In order to open and view in PDF you must have Adobe Reader installed on your system. You may download this software, at no cost, from http://www.adobe.com/reader.

>

>

> IMPORTANT NOTICE REGARDING USER ID

>

>

> The Web Tools User ID provided is for you and your company to use when requesting data via the Internet from the U.S. Postal Service API servers. This unique User ID cannot be shared with others outside your organization, nor is it to be packaged and distributed or sold to other individuals, businesses or e-commerce web site entities. As per the Terms and Conditions of Use Agreement you agreed to during the Web Tools registration process, you are responsible to maintain the confidentiality of your User ID as specified. You may not package any APIs with your User ID for resale or distribution to others. The U.S. Postal Service does not prohibit the reuse and/or distribution of the API documentation (User's Guide) with sample code in order to generate awareness, encourage use or provide ease-of-use to customers or affiliates.

>

> Warning - If the U.S. Postal Service discovers use of the same User ID from more than one web site, all users will be subject to loss of access to the USPS production server and/or termination of the licenses granted under the Terms and Conditions of Use. For more information regarding the USPS Web Tools User ID policy, or for questions regarding distribution of documentation, send email to [email protected].

>

> Thank you for helping the U.S. Postal Service provide new services to our shipping customers.

>

> Sincerely,

>

> The Internet Shipping Solutions Team

>

> USPS Internet Customer Care Center

> [email protected]

> 7:00AM - 11:00PM EST

>

>

Link to comment
Share on other sites

  • 1 month later...

Just wanted to confirm this.

 

Using the advice on this board I called the number in my email (1-800-344-7779) and pressed #3 (Web API) at their menu. I was instantly in touch w/ a tech....

 

Me: "I'd like my account moved to the production server."

Him: "Ok, your account number?"

Me: "xxxxxxxxxx"

Him: "Are you using a 3rd party shopping cart?"

Me: "Yes, osCommerce."

Him: "Ok, this will take a couple minutes."

Me: "Password is no longer required, correct?"

Him: "Yes, you can just enter 'password' in the password field."

...20 seconds later...

Him: "Ok, you're all set, you'll be receiving an email shortly."

Me: "Great, thanks."

 

I then when back to my webpage where iw as testing my checkout process, clicked refresh and had the USPS shipping estimates. Simple as pie.

Sean Benoit

Syosoft Corporation

Link to comment
Share on other sites

  • 3 weeks later...
Just wanted to confirm this.

 

Using the advice on this board I called the number in my email (1-800-344-7779) and pressed #3 (Web API) at their menu. I was instantly in touch w/ a tech....

 

Me: "I'd like my account moved to the production server."

Him: "Ok, your account number?"

Me: "xxxxxxxxxx"

Him: "Are you using a 3rd party shopping cart?"

Me: "Yes, osCommerce."

Him: "Ok, this will take a couple minutes."

Me: "Password is no longer required, correct?"

Him: "Yes, you can just enter 'password' in the password field."

...20 seconds later...

Him: "Ok, you're all set, you'll be receiving an email shortly."

Me: "Great, thanks."

 

I then when back to my webpage where iw as testing my checkout process, clicked refresh and had the USPS shipping estimates. Simple as pie.

 

Yep, it was that easy. And he even had a smile on his face =-) Don't you wish they were all that easy?

Link to comment
Share on other sites

  • 3 years later...

USPS API "Big House" location?

 

I know that I'm a newbie and this is a question from left field, but it seemed that a lot of postal / shipping / API questions were being discussed in this thread so I decided to drop in.

 

When you submit a request for the assignment of an Electronic Delivery Confirmation number, the recipient information (name, address, zip, zip4, etc.) is sent to a computer that verifies the accuracy of the address, identifies the next available DC number, calculates the barcodes and check digits, and returns that information to the requesting system.

 

I suspect that almost all that information is stored in a database, or at the very least in a log in one or more places.

 

I have a theory that if law enforcement / anti-terrorism intercepted an anonymous / untraceable posting and only had an Electronic Delivery Confirmation number for a suspect parcel, they would be able to go to someone at USPS with a warrant and demand all the information available on the item in question, finding out who sent it and the delivery address.

 

My question is this: Where would they present their request? Where would someone inside USPS present the same request?

 

I think that the people responsible for the APIs know where all the information is -- I just don't know right now how the dots are connected to get you there.

 

Disclaimer: Not a LEO or Spy.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...