Package.ShippingLabel = Convert.FromBase64String(xml. 'package.ShippingLabel = StringToUTF8ByteArray(xml.Substring(i1, i2 - i1)) 4, (), package.OriginZipcode, (), labeldate, _ĭim xml As String = web.DownloadString(url)ĭim idx1 As Integer = xml.IndexOf(" ") + 13ĭim errDesc As String = xml.Substring(idx1, idx2 - idx1)ĭim i1 As Integer = xml.IndexOf(" ") + 27 Format(url, Me._userid, CInt(package.LabelType),, , 1, _ If () = () Thenĭim url As String = "?API=ExpressMailLabelCertify&XML= " Public Function GetExpressMailConfirmationLabel(package As Package) As Packageĭim labeldate As String = () I have updated the source code to include the XML Parser version of the FromXML method on the Address object. I will look into this and make changes to the code accordingly. It appears that USPS may have changed some of the behaviour of their Web services. Enter a ZIP Code to see the cities it covers. Enter city and state to see all the ZIP Codes for that city. Note: If you want to test the other label methods, you will need to download the Guides from the USPS Web Tools site and use the sample data they provide. Enter a corporate or residential street address, city, and state to see a specific ZIP Code. Available only with certain products and to certain domestic destinations. For details on free Package Pickup, go to Schedule a Pickup. Money orders are safe, cost-effective, and never expire. Pay with a debit card, cash, or traveler’s check. P.PackageType = PackageType.Flat_Rate_Box Sending money orders at any Post Office is easy to do. P.ToAddress.Address2 = " 6060 PRIMACY PKWY" P.FromAddress.Address2 = " 475 L'Enfant Plaza, SW" USPSManager m = new USPSManager( " YOUR_USER_ID", true) / true if you want to use the USPS Test Servers. / your USPS Web Tools User ID and the second is / The constructor takes 2 arguments, the first is / Create a new instance of the USPS Manager class Once you have tested your application, you can request your profile to be updated by USPS to access the production environment, where you can use any appropriate data. If you change the address or anything else, you will get an error. Note: If you are using the USPS Test servers, then the data in the examples below are the only data that will work. You can do this by filling out this form. Please keep in mind that this is my first CodeProject article, so go easy! :) USPS Web Toolsīefore you can use this library, you will need to get a USPS Web Tools ID. (This library will work in ASP.NET Web applications also.) The USPS Web tools are fairly easy to integrate, but I wanted to create a reusable component that I could use in future projects. I was in need of a library that would integrate the USPS Web Tools into my Windows form application. I will post them here on The Code Project when I am finished, but you can check this Web site until then for updates and to contact me directly. The DHL version should be the next one I release. *NOTE: Black and white (grayscale) images show the front of the outside of letter-sized envelopes and mailpieces that are processed through USPS ® automated equipment.UPDATE: I am working on a FedEx, UPS and DHL version of this tool. USPS carriers will leave your packages in your mailbox or at your preferred delivery location if they are too large to fit in your mailbox. Informed Delivery for personal accounts includes USPS Electronic Signature Online ® (USPS eSOL ®), a feature that allows you to digitally sign for incoming packages that require a signature including Priority Mail Express ®, Signature Confirmation ™, and those insured for $500 or more. From the Informed Delivery ® dashboard, you can also sign up for text or email notifications, schedule delivery alerts, request Redelivery, enter USPS Delivery Instructions ®, and more. Now both business and personal accounts can preview images* of mail and manage incoming packages on one dashboard without entering tracking numbers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |