Jump to content

Archived

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

Al Brookbanks

USPS Rate v3 Module

Recommended Posts

Guest Gilead

Installed the new module, did a test order, and got the following error message:

Request XML:<RateV3Request USERID="699POWER2015" PASSWORD="password"><Package ID="0"><Service>PRIORITY</Service><ZipOrigination>49504</ZipOrigination><ZipDestination>49504</ZipDestination><Pounds>0</Pounds><Ounces>4</Ounces><Container>VARIABLE</Container><Size>Regular</Size></Package></RateV3Request>Return XML:<?xml version="1.0"?>

<RateV3Response><Package ID="0"><Error><Number>-2147219431</Number><Source>DomesticRatesV3:clsRateV3ValidateContainer;RateEngineV3.ProcessRequest</Source><Description>Invalid container type. Valid container types for Priority Mail are Flat Rate Envelope and Flat Rate Box.</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error></Package></RateV3Response>

If I'm reading this right, you might have to put your userid in as the password. That's what I was told when last I talked to USPS about it.

Share this post


Link to post
Share on other sites

Guest chsirecat

I had this working this morning for v3 and the changes are in v4. I will release a new package a little later. We are flat out right now as it is v4 Beta release day.

did anyone ever figure this out?????

this the email I got from usps:

Thank you for contacting us. Congratulations on completing your testing using the U.S. Postal Service's Internet Shipping Application Program Interfaces (APIs).

Your profile has been updated to allow you access to the Production Server.

1. The Production Server URL is: http://production.shippingapis.com. For APIs calling the secure server, the URL is https://secure.shippingapis.com.

2. There is a line of code that refers to "shippingapitest.dll". You'll need to remove the word "test".

If you are using third party software and need assistance, please contact the vendor of the software. They should be able to assist you in obtaining live information using our APIs.

where do I change this url and where is the code that I take out "test"? I can't find it.

I did change the code on line 424 on the file class.usps.php and now I get an error:

XML error: SYSTEM or PUBLIC, the URI is missing at line 1

HELP!!!!!

Share this post


Link to post
Share on other sites
Guest JCreager

Does anyone know why I can't get Priority and Express Mail to work with anything other than flat-rate boxes?

Return XML:

--------------------------------------------------------------------------------

<?xml version="1.0"?>

<RateV3Response><Package ID="0"><Error><Number>-2147219431</Number><Source>DomesticRatesV3:clsRateV3ValidateContainer;RateEngineV3.ProcessRequest</Source><Description>Invalid container type. Valid container types for Priority Mail are Flat Rate Envelope and Flat Rate Box.</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error></Package></RateV3Response>

It looks like the container types "Variable Weight", "Rectangular", etc. are not recognized by the post office's server.

Share this post


Link to post
Share on other sites
Guest clothmom

Request XML:<RateV3Request USERID="littlebugbottoms" PASSWORD="Workingdogs1"><Package ID="0"><Service>PRIORITY</Service><ZipOrigination>48461</ZipOrigination><ZipDestination>95758</ZipDestination><Pounds>1</Pounds><Ounces>0</Ounces><Container>FLAT RATE ENVELOPE</Container><Size>Regular</Size></Package></RateV3Request>Return XML:<Error>

<Number>80040b1a</Number>

<Description>Username exceeds maximum length.</Description>

<Source>UspsCom::DoAuth</Source>

</Error>Request XML:<RateV3Request USERID="littlebugbottoms" PASSWORD="Workingdogs1"><Package ID="0"><Service>PARCEL</Service><ZipOrigination>48461</ZipOrigination><ZipDestination>95758</ZipDestination><Pounds>1</Pounds><Ounces>0</Ounces><Container></Container><Size>Regular</Size><Machinable>TRUE</Machinable></Package></RateV3Request>Return XML:<Error>

<Number>80040b1a</Number>

<Description>Username exceeds maximum length.</Description>

<Source>UspsCom::DoAuth</Source>

</Error>

Warning: Cannot modify header information - headers already sent by (output started at /home/content/h/d/k/hdk9s/html/sewsational/shop/modules/shipping/USPS/class.usps.php:464) in /home/content/h/d/k/hdk9s/html/sewsational/shop/includes/content/cart.inc.php on line 610

This is what I am getting. Any clue what I am doing wrong? I have not uploaded anything just the version 3

Share this post


Link to post
Share on other sites
Guest JCreager

Request XML:<RateV3Request USERID="littlebugbottoms" PASSWORD="Workingdogs1

This is what I am getting. Any clue what I am doing wrong? I have not uploaded anything just the version 3

Is that really the ID that the USPS issued to you? It doesn't look machine generated to me.

Share this post


Link to post
Share on other sites
Guest Desafio

Hi,

I just install the cart and I been trying to get the USPS shipping module to work and this is what I am getting

Request XML:<RateV3Request USERID="055SZULE4787" PASSWORD="666EG39LW197 "></RateV3Request>Return XML:<?xml version="1.0"?>

<Error><Number>-2147219085</Number><Source>Rate_Respond.;SOLServerRates.RateV3_Respond</Source><Description>Invalid XML Element cannot be empty according to the DTD/Schema.

</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error>

Request XML:<RateV3Request USERID="055SZULE4787" PASSWORD="666EG39LW197 "><Package ID="0"><Service>PRIORITY</Service><ZipOrigination>11435</ZipOrigination><ZipDestination>10457</ZipDestination><Pounds>0</Pounds><Ounces>4</Ounces><Container>FLAT RATE BOX</Container><Size>Large</Size><Width>3-3/8</Width><Length>11-7/8</Length><Height>13-5/8</Height></Package></RateV3Request>Return XML:<?xml version="1.0"?>

<RateV3Response><Package ID="0"><Error><Number>-2147219427</Number><Source>DomesticRatesV3:clsRateV3ValidateContainer;RateEngineV3.ProcessRequest</Source><Description>Invalid container type. Valid container types for Priority Mail - Large are Rectangular and NonRectangular.</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error></Package></RateV3Response>

Can some one tell me what I am doing wrong or how to correct the problem?

Thanks,

Letty

Share this post


Link to post
Share on other sites
Guest

I'm unable to get the international API to work. Any time I try a test customer from non-US countries the shipping rate drop-down comes up blank. See http://www.grandcentralartcenter.com/store/ for example. There is no error and no indication of why this is happening.

Does anyone have any idea what's up? This is a standard, non-modded store and seems like a totally simple install. The USPS shipping module works perfectly for US customers.

Any help would be greatly appreciated.

-=e=-

Share this post


Link to post
Share on other sites
Guest Imp

Ok, a couple months ago, I was able to use < 1 ounce (.001 lb) per item for certain items and it was the price of a 1st class stamp. Small decals that fit in an envelope, one stamp.

Between the last time I checked to make sure prices were updating right, the minimum for USPS is now $1.13 for shipping now showing up for my items.

How does .001 lbs equate to $1.13 postage now?

--kC

Share this post


Link to post
Share on other sites
Guest bmorris

* UPDATED 11th JULY v4 - tested & working with National & International *

- Although the documentations says test transactions have to be passed before they will move your account to the production server this is not longer the case. New activation instructions can be found in the new module attached.

Below is a new USPS module which addresses the changes for Rate v3. It has been tested on CubeCart 3.0.16 returning both international and national quotes.

To install take a backup of your store and upload the contents over your existing files.

MOD Edit: Related thread posted/stickied: Here

I found this fix to work quite well for Cube Cart version 3.0.18

I did not find any instructions in the USPSv4.zip file.

I backed up the store files and uploaded the files for the fix.

Have not done a test yet but I do see the USPS is configured and it shows up in the cart for shipping. I can purchase an order up to the paypal checkout so I assume it is working. Is that all I have to do?

I read somewhere in a forum here that I would have to upload the original store files that I had overwritten with this fix?

Share this post


Link to post
Share on other sites

Works for me!

Thanks AL & all who worked on this

I have a client who is still with a ver3 CC due to so many customization I never upgraded them. I had USPS variable rates working.. then just was notified by the client their customers were getting errors

Well Iw as getting thos weird XML errors.

I used AL T's zip files - followed the instructions

tested and its working great! :yeahhh:

Share this post


Link to post
Share on other sites
Guest

accidentally purchased a USPS domestic money order and the recipient needed an international money order. The Pay To: was filled out with his name and he is sending it back. Will USPS be able to easily change this for me?

Share this post


Link to post
Share on other sites

Since no one has posted fixes yet

To get around:

USPS ERROR: One of the following variables was empty...

Open /modules/shipping/USPS/calc.php

Find:

if(!$usps->add_package($package) && $module['debug']==0) die("Failed to add the package");



Replace with:


//if(!$usps->add_package($package) && $module['debug']==0) die("Failed to add the package");



To get around:

Authorization Error connecting to United States Postal Service Server...
Please not this assumes the USPS shipping is/was working for you before. Open /modules/shipping/USPS/calc.php Find:

$usps->submit_request();



Replace with:


//$usps->submit_request();

Thank you!

All I had to do was change "Parcel" to "ParcelM"

Share this post


Link to post
Share on other sites

I seem to be dragging up an old problem. I have installed the mod in CC3.20 and while evrything works fine if I have whole numbers in the product weight field as soon as I put in anything less than 1.00lbs. which I need to do for items weighing ounces, then it doesn't work. Comes back with failed to add package. With debug on then I get a huge error report.

Anybody got the USPS module working in 3.20? Any ideas what's wrong?

David

Share this post


Link to post
Share on other sites

×
×
  • Create New...