close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

USPS wants XML eCart generates PHP...

Thread began 6/28/2011 4:35 pm by James L | Last modified 7/06/2011 12:31 pm by Jason Byrnes | 2421 views | 3 replies |

James L

USPS wants XML eCart generates PHP...

I originally set up to get shipping cost estimate from UPS; this worked fine. My client decided to change to US Postal Service shipping. eCart generated the code for this, but USPS rejects the request.

eCart generated this code:
$Shipping_Parameters["UserID"] = "1234567";
$Shipping_Parameters["Password"] = "89101112";
$Shipping_Parameters["USPSServer"] = "http://production.shippingapis.com/shippingapi.dll";
$Shipping_Parameters["CarrierCode"] = "PRIORITY";
$Shipping_Parameters["DefaultIntl"] = "First-Class Mail International Package";
$Shipping_Parameters["ShipperZip"] = "48915";

But it says "production.shippingapis" and I know they have to approve you for "production" so I changed that line to what USPS sent, which was:
$Shipping_Parameters["USPSServer"] = "http://testing.shippingapis.com/ShippingAPITest.dll";

This was also rejected.

Perhaps because the email from USPS says the code to send them should look like this (for the testing server):

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

What should I do here? I'm getting to understand PHP, but mixing it with XML is new to me...

Sign in to reply to this post

Jason ByrnesWebAssist

the php code of eCart generates an xml request that is sent to USPS.

eCart uses the V3 rate request API which is not supported on the testing server, you will need to use the production server address, and contact USPS to have you account updated to use the production server.


if it is still failing, open the shipping failure page, and go to the bindings panel, there will be a USPS Binding group, expand that and add the Full Request and Full Response bindings to the page, this will help us debug the cause by showing the response coming back from USPS.

Sign in to reply to this post

James L

Don't see a "USPS Binding Group"

This post has been deleted.

James L

eCart update for USPS API?

I just noticed there is a "eCart 5: Support Fix - Updated USPS Shipping Rate Lookup API" which gives me a new WA_eCart_USPS_PHP.php file. Maybe this will resolve my problem, however when I try using it the cart doesn't go thru to shipping_failure.php, but instead stalls while still in confirm.php with the error message:

Notice: Undefined variable: USPS_PkCount in /Applications/MAMP/htdocs/ProRes_Shipping/WA_eCart/WA_eCart_USPS_PHP.php on line 129 (it repeats this error for lines 134 & 170)

If you can help me resolve this error, then maybe I can get to the point of connecting to the Postal Service...

Sign in to reply to this post

Jason ByrnesWebAssist

you started another thread for this issue, where i opened a support ticket so we can investigate the issue with your over the phone.

Sign in to reply to this post

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...