USPS Real time shipping calculations

Hello again :slight_smile:



Has anyone successfully used the USPS Real time calculator?



I got a user Id and password from USPS to access their API.



I copied the Id into the CS-Cart settings, but there is no password field :confused:



Then when I test the function it returns an error message, type: ā€œYou are not authorized to access the serverā€. Seems obvious that I am not authorized - but what do I miss here?



Has anybody made it work? Where does the password go?



Thanks



The Gold Bar Kid ā€¦ Yes meā€¦

I believe after you receive your account, you need to contact USPS and tell them to make your account live.



That is what I needed to do.



In CS-Cart, I did not check ā€œTest Modeā€ under Administration | Settings | Shipping Settings | USPS.



When I do the test in Shipping/taxes | Shipping Methods it works.



You need to add a Shipping Method for each type of shipping you want to provide the customer.

Hello,



I read the above thread and response from another user but I too have not been able to get USPS to work in CS-Cart. I currently use other software with USPS (6 yrs now) real-time and I do have a password and on my old software I have no problems with real-time working as it should. Since my account is already active with the Post Office I donā€™t think thatā€™s the problem.



I have tried several different ways to get it working in CS-Cart but have been unsuccessful. I canā€™t even get the manual method to work. I have tried with and without testing with no success.



I am open to any other suggestions.



Thanks.

Thanks Jegesmaci,



Does it work for you not doing a test as well?



I looked at your instructions and tried to follow them.



But I am still enable to work this out. I have not contacted USPS yet however. I have not read any instructions to this effect from them before and getting my userID and password was all automatic by email, see the following:





ā€œ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 Username is 9xxxxxxxxxx6

Your Password is 5xxxxxxxxxx5



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 [url]http://testing.shippingapis.com/ShippingAPITest.dll[/url] or [url]https://secure.shippingapis.com/ShippingAPITest.dll[/url]. 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 [url]http://www.usps.com/webtools[/url]) 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.ā€





Note that they donā€™t talk about using the password, so I donā€™t know yet - Iā€™ll call them. (if you go to [url]http://www.usps.com/webtools/htm/Rate-Calculators-v2-3.htm[/url] though it appears that one would need to provide USERID and PASSWORD to query the API).



Back to CS-Cart, when I have test mode checked in Administration | Settings | Shipping settings | USPS and I do a test under Shipping/taxes | Shipping methods | edit "USPS First-Class Domestic Mail (the name I gave to the shipping method)



I get the following error message:

ā€œAPI Authorization failure. RateV3 is not a valid API name for this protocolā€



When I have the test mode button above unchecked and do the same I get another error message as follows:

ā€œAuthorization failure. You are not authorized to connect to this server.ā€



I do have my ā€œShipping Chargesā€ tab filled in for USA with different rate values, etc, by the way.



Altogether I believe that the CS-Cart technicians are looking at this as well and they will let me know soon.



What does not make sense at all to me is: not being able to enter the password, and also to only have a fixed set of sizes and other characteristics to calculate the price of shipping. The calculation should take into account the characteristics of what you are going to ship, so that data should be provided to the USPS API as well.



Ywalker - letā€™s see if anyone else has been able to solve this problem.



To be continuedā€¦



Gold Bar Kid

Is there anyone else who has been able to make it work in the latest versions?

[QUOTE]Is there anyone else who has been able to make it work in the latest versions?[/QUOTE]



Yes, we use USPS Realtime rates & process several orders per day using this shipping method with version 2.08, so it will work for you with proper settings.


[QUOTE]email the USPS Internet Customer Care Center (ICCC). They will switch your profile to allow you access to the production server[/QUOTE] Donā€™t waste time testing this, just request that they switch your account to the production server, it will work.

GoldBarKid,



Were you able to get it to work? I am just started with CS-Cart. I copied over my USPS info from my old shopping cart and ran through a few test orders and it calculated shipping perfectly.



Adam

I find that the settings in CS-Cart are rather odd for USPS as I said above I have real-time calculation with them now. In my current software as I am migrating to CS-Cart I do not enter all those different package sizes that CS-Cart has in there for USPS, I use several different package sizes depending on what I am shipping, besides as long as itā€™s under I think 84" in girth or something similar it is considered regular package and it does not matter if the package is 6x6x4 or 8x8x8 so when I saw those questions in CS-Cart set-up I had no idea why.



My old software set-up for USPS real time is user name and password, check box to indicate if I want to enable international rates, check if I want priority mail, parcel post and/or first class; I can check all of them or any combination of them. I also indicate the packages are regular or oversize and machinable and thatā€™s it. Has worked for 6 years with no problem. On the international USPS automatically will return flat-rate priority mail, priority mail international or/and express if applicable depending on country and/or province then the customer can choose which they want. I did not have to set-up anything other than locations.



CS-Cart technicians are working on the issue and I look forward to it being resolved. I am not changing shipping methods and canā€™t go live without it.

They will hopefully update us soon.

First Class International shipping options are screwed since USPS made a change to the web tools on Jan 4, 2010.

Anyone have a fix for this?

So far all I have found is this post on the Magento forum:

[url]Home - Magento Forums

But, his attached text file is corrupted or truncated and useless.



I rely on this class of service for an inexpensive shipping option to overseas from the US.

[quote name=ā€˜Magpie Donā€™]First Class International shipping options are screwed since USPS made a change to the web tools on Jan 4, 2010.

Anyone have a fix for this?

[/QUOTE]



Edit the table ā€œcscart_shipping_servicesā€

Replace all ā€œFirst Class Mailā€ in code texts with ā€œFirst-Class Mailā€ and you should be fine.



How to edit the fields in your database I leave up to you all. Just use phpmyadmin or navicat or something.



James

http://www.RPGShop.com

I have the same problem, no field for password, and test failed with error message ā€œAPI Authorization failure. RateV3 is not a valid API name for this protocolā€



So just call USPS to switch to live then it will work without actually testing it ?



Please confirm because that sounds really odd ā€¦

Yes, call USPS, I just did and within few seconds I can get the newly created user to display the postage price when setting up each USPS service :slight_smile:

For some reason I cannot get Express Mail International to show up as an option for international customers at checkout. Does anyone know how to fix this? Is it something to do with the codes in the CS-Cart database? Iā€™m still on 2.0.6.



First Class Mail International Package and Priority Mail International are both working fine and show up in checkout.



Thanks.

Take a look at post #6 in the following thread:

[url]http://forum.cs-cart.com/showthread.php?t=16191[/url]



I am pretty sure that will fixit.



Bob

Looks like that only affects First Class Mail. I have already corrected those entries. Is there a similar fix for Express Mail International?

[quote name=ā€˜kingsleypressā€™]Looks like that only affects First Class Mail. I have already corrected those entries. Is there a similar fix for Express Mail International?[/QUOTE]

Try this:

REPLACE INTO cscart_shipping_service_descriptions (service_id, description, lang_code) VALUES ('43', 'USPS Express Mail International', 'EN');
REPLACE INTO cscart_shipping_service_descriptions (service_id, description, lang_code) VALUES ('44', 'USPS Express Mail International Flat-Rate Envelope', 'EN');




Bob

Iā€™m afraid that didnā€™t work either. Maybe I just need to not worry about Express Mail International for now and hope that it will be fixed when I upgrade my cart to 2.0.14 which I finally hope to do sometime in the next couple of weeks.



Thanks for your input Bob. Your presence on these forums is a great help.

In the USPS shipping settings, what do you have ā€œType of mailā€ set to - Package or Envelope?



Bob

[quote name=ā€˜kingsleypressā€™]Iā€™m afraid that didnā€™t work either. Maybe I just need to not worry about Express Mail International for now and hope that it will be fixed when I upgrade my cart to 2.0.14 which I finally hope to do sometime in the next couple of weeks.

[/QUOTE]

Oopsā€¦I missed correcting the actual codes used to lookup the rates which are stored in the cscart_shipping_services table. In addition to the above queries, run these too:


UPDATE cscart_shipping_services SET code='Express Mail International' WHERE service_id='43';
UPDATE cscart_shipping_services SET code='Express Mail International Flat Rate Envelope' WHERE service_id='44';




I think this will get them working.



Bob

Yep! That did it. Thanks!



Youā€™re a genius, Bob.