close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

USPS Rate Lookup API Failure

Thread began 1/07/2010 9:32 pm by lazyhoofer376912 | Last modified 1/14/2010 9:51 pm by Eric Mittman | 2759 views | 9 replies |

lazyhoofer376912Beta Tester

USPS Rate Lookup API Failure

Hopefully you all can help me with the below issue. I have a PowerStore 2 site setup with USPS Rate Lookup and Authorize.net charge card access.

I've run into an issue with the Rate Lookup specifically where I attempt to checkout and I have the Rate Lookup activated, I'm bumped to the Checkout Failure page. If I disable the Rate Lookup, my site works fine and I can process payments.

I've contacted USPS and they've advised me that I am on the LIVE servers. Below is a snipet from my GLOBAL code and also the e-mail received from USPS.

Global:
// USPS Shipping Settings
$WAGLOBAL_USPS_User = "xxxxxxxx1314"; // get this when you sign up for API access
$WAGLOBAL_USPS_Server = "http://production.shippingapis.com/ShippingAPI.dll"; // change this to the live server when you go live
$WAGLOBAL_USPS_ShipType = "FIRST CLASS"; //Enter the appropriate value for domestic shipping, based on the USPS Shipping key at the bottom of this page.
$WAGLOBAL_USPS_IntShipType = "Global Express Mail (EMS)"; //Enter the appropriate value for shipping to international customers, based on the USPS Shipping key at the bottom of this page.

E-mail 1:
"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 xxxxxxxx1314
Your Password is xxxxxxxxD745

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 ShippingAPITest.dll or
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 webtools) for the
specific API you are integrating."

E-mail 2:
"Congratulations on completing your testing using the U.S. Postal
Service's Web Tools Application Program Interfaces (APIs). Your
profile has been updated to allow you access to the Production Servers.

The URLs you will use for the Production Servers are:
ShippingAPI.dll
ShippingAPI.dll

Profiles that are inactive for four years will be permanently deleted
without notice."

Thanks for the help!

Sign in to reply to this post

Eric Mittman

You will need to put the bindings for the full request and full response on the checkout failure page to see what is causing the error. Here is the code you will need to put on this page, you just insert this code where you would like to see the information appear on that page:

full request

php:
<?php echo $_SESSION["WA_Store_Cart_USPS_FullRequest"]; ?>



full response

php:
<?php echo $_SESSION["WA_Store_Cart_USPS_FullResponse"]; ?>
Sign in to reply to this post

lazyhoofer376912Beta Tester

USPS Rate Lookup API Failure! Please Help

So i put the code into the page and this is what i got....

API=RateV3&XML=FIRST CLASSFIRST CLASS117351111102REGULAR -2147219085Rate_Respond.;SOLServerRates.RateV3_RespondInvalid XML Element content is invalid according to the DTD/Schema. Expecting: FirstClassMailType, ZipOrigination. line= 0 pos= 12371000440


how do i go about fixing this?

Sign in to reply to this post

Eric Mittman

This seems similar to another issue that was discovered with the way the xml is sent. If you can please post back and include a copy of your WA_eCart folder in a zip archive so I can take a look at your USPS pages to determine if this is a related issue.

Sign in to reply to this post

lazyhoofer376912Beta Tester

thank you so much for helping out with this.

Sign in to reply to this post

Eric Mittman

It looks like the file did not get uploaded to the post. You will need to first add the WA_eCart folder from your site root to a zip archive. Once it is in a zip file you can the upload the zip with your reply. I will examine the files to try and find where the problem is coming from.

Sign in to reply to this post

lazyhoofer376912Beta Tester

uploaded zip

heres the zip file. sry about b4 thought it sent.

Attached Files
WA_eCart.zip
Sign in to reply to this post

Eric Mittman

Please give this a try with this WA_eCart_USPS_PHP.php file and let us know if it solves the problem for you. This file goes inside of your WA_eCart folder in your site.

Attached Files
WA_eCart_USPS_PHP.zip
Sign in to reply to this post

lazyhoofer376912Beta Tester

so i replaced the file with what you gave me and it said this now.....



API=RateV3&XML=FIRST CLASS117351173502REGULAR -2147219428DomesticRatesV3;clsRateV3.ValidateFirstClassMailType;RateEngineV3.ProcessRequestInvalid First Class Mail Type.1000440

Sign in to reply to this post

Eric Mittman

I have opened a new ticket for you on this issue. To check the status or update the ticket please login to WebAssist.com and visit your support history.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...