usps

XML Request and Response with PHP for USPS Rate Calculator

∥☆過路亽.° 提交于 2019-12-10 22:16:14
问题 I have been trying to build a USPS Rate Calculator for a site, but unfortunately the test url from USPS does not seem to work. In any case, my code does not return anything at the moment, not even the error message about the url... Would you take a look to see if I am doing the right thing? I get a bit lost with XML on PHP... CODE: $zip = 90002; $pounds = 0.1; function USPSParcelRate($pounds,$zip) { $url = "https://secure.shippingapis.com/ShippingAPITest.dll"; curl_setopt($ch, CURLOPT_URL,

Obtaining USPS orders tracking status with PHP

二次信任 提交于 2019-12-10 14:33:22
问题 Error is thrown when trying to retrieve the status of a USPS order using the USPS Tracking API. However, when running the code I built based on the USPS manual, I am getting the following error: " 80040B19XML Syntax Error: Please check the XML request to see if it can be parsed.USPSCOM::DoAuth " Link to the manual: https://www.usps.com/business/web-tools-apis/track-and-confirm-v1-3a.htm Here is my code: $trackingNumber = 123456; $url = "http://production.shippingapis.com/shippingAPI.dll";

Send xml as part of URL request in Java

牧云@^-^@ 提交于 2019-12-10 10:48:46
问题 This might be a trivial question but I'm trying to send web request to USPS to get a http post response (or email response depending on my request) containing the tracking information based on the tracking number that I send in. The documentation says the xml needs to appended as part of the url like below http://secure.shippingapis.com/ShippingAPITest.dll?API=TrackV2&XML=<PTSEmailRequest USERID="xxxxx"><TrackId>xxxxx</TrackId><RequestType>EN</RequestType></PTSEmailRequest> I saw there were 2

No results when using a web API

旧街凉风 提交于 2019-12-04 02:13:13
问题 I'm attempting to pull an XML page from the U.S. Postal Service (USPS) rate calculator, using PHP. Here is the code I am using (with my API login and password replaced of course): <? $api = "http://production.shippingapis.com/ShippingAPI.dll?API=RateV4&XML=<RateV4Request ". "USERID=\"MYUSERID\" PASSWORD=\"MYPASSWORD\"><Revision/><Package ID=\"1ST\">". "<Service>FIRST CLASS</Service><FirstClassMailType>PARCEL</FirstClassMailType>". "<ZipOrigination>12345</ZipOrigination><ZipDestination>54321<

USPS API returning 80040B19 error code and Account is in Production

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: so my issue is according to the documentation (wich is pretty slim and not the greatest) the xml i have is everything that is required, but im getting this error code back <?xml version="1.0" encoding="UTF-8"?> <Error><Number>80040B19</Number><Description>XML Syntax Error: Please check the XML request to see if it can be parsed.</Description><Source>USPSCOM::DoAuth</Source></Error> this doesnt make much sense to me because my account is in production mode, and as i said according to the documentation i have everything that is required, i

How to remove 'SAMPLE DO NOT MAIL' from USPS shipping API image

半腔热情 提交于 2019-12-01 14:10:26
I am having problem with USPS shipping API Here is my XML https://secure.shippingapis.com/ShippingAPI.dll?API=DelivConfirmCertifyV4&XML=%3C?xml%20version=%221.0%22%20encoding=%22UTF-8%22%20?%3E%3CDelivConfirmCertifyV4.0Request%20USERID=%22228OURBA2607%22%20PASSWORD=%22728ZK94KL112%22%3E%3CRevision%3E2%3C/Revision%3E%3CImageParameters%20/%3E%3CFromName%3EJohn%3C/FromName%3E%3CFromFirm%3E%20%3C/FromFirm%3E%3CFromAddress1%3EFlat%201%3C/FromAddress1%3E%3CFromAddress2%3ERoad%201%3C/FromAddress2%3E%3CFromCity%3ENY%3C/FromCity%3E%3CFromState%3ENY%3C/FromState%3E%3CFromZip5%3E12345%20%3C/FromZip5%3E

How to remove 'SAMPLE DO NOT MAIL' from USPS shipping API image

人盡茶涼 提交于 2019-12-01 13:47:24
问题 I am having problem with USPS shipping API Here is my XML https://secure.shippingapis.com/ShippingAPI.dll?API=DelivConfirmCertifyV4&XML=%3C?xml%20version=%221.0%22%20encoding=%22UTF-8%22%20?%3E%3CDelivConfirmCertifyV4.0Request%20USERID=%22228OURBA2607%22%20PASSWORD=%22728ZK94KL112%22%3E%3CRevision%3E2%3C/Revision%3E%3CImageParameters%20/%3E%3CFromName%3EJohn%3C/FromName%3E%3CFromFirm%3E%20%3C/FromFirm%3E%3CFromAddress1%3EFlat%201%3C/FromAddress1%3E%3CFromAddress2%3ERoad%201%3C/FromAddress2%3E

No results when using a web API

落爺英雄遲暮 提交于 2019-12-01 12:00:57
I'm attempting to pull an XML page from the U.S. Postal Service (USPS) rate calculator, using PHP. Here is the code I am using (with my API login and password replaced of course): <? $api = "http://production.shippingapis.com/ShippingAPI.dll?API=RateV4&XML=<RateV4Request ". "USERID=\"MYUSERID\" PASSWORD=\"MYPASSWORD\"><Revision/><Package ID=\"1ST\">". "<Service>FIRST CLASS</Service><FirstClassMailType>PARCEL</FirstClassMailType>". "<ZipOrigination>12345</ZipOrigination><ZipDestination>54321</ZipDestination>". "<Pounds>0</Pounds><Ounces>9</Ounces><Container/><Size>REGULAR</Size></Package><