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