US Postal Service Real Time setup VP-ASP 5.00 Sept 6, 2003 Summary This code interfaces to the USPS to obtain real time shipping rates USPS Real time requires Microsoft's XML DLL to be on your server. Because of recent problems with XML this version can also use ASPTEAR or DYNUHTTP 1. Copy all these these files to the VP-ASP install directory uspostalrealtime.asp - New uspostaltransport.asp - New uspostalconfig.asp - New uspostalinterface.asp - New uspscountries.txt - New 2. Change VP-ASP Shop Configuration values xShippingCalc="Other" 3. Add 1 additional selection to your current shipmethods table It can be any name you want. In the "shiproutine" add the value uspostalrealtime.asp. USPS requires weight in pounds an ounces. You need to select a field in the products table to place the ounces. Pother4 is the default If no ounces are specified, the default is 0. The default weeight field for pounds is "weight". This can also be chnaged Pounds must be whole numbers. USPS Userid and Password USPS requires that you register and obtain a userid and password before this service can be used The merchant userid and password are assigned by USPS Here's where you go to register with USPS. http://www.uspsprioritymail.com/et_regcert.html How it Works VP-ASP will display the normal shipping forms. If USPS is selected as the shipping method the file uspostalrealtime.asp will be called before shopcreateorder.asp It will determine the USPS rates based on the weight being shipping and display a new dropdown list with different USPS options Customer then selects appropriate shipping method. Using Different Transport Methods Your server may or may not have the XML DLL required for this file. Supported methods are XML3, XML4, ASPTEAR and DUNHTTP ASPTEAR and DUNUHTTP can be supplied on request In uspostalconfig.asp you can determine te transport method by this line Const Interface= "XML2" A quote makes the line a comment. So to use XML4 it would look like 'Const Interface= "XML3" Const Interface= "XML4" 'Const Interface= "ASPTEAR" 'Const Interface= "DYNUHTTP" 'Const Interface= "XML2" For more information on Microsoft XML DLLS please see www.vpasp.com/virtprog/info/faq_xmlproblems.htm USPS Real Configuration Options Edit uspostalconfig.asp and set these options const MerchantUSERID="uuuuuuuuu" const MerchantPASSWORD="ppppppppppp" const XMerchantZip="75007" Other Options you may wish to set ' Setting to Yes forces calculation of each product separately ' This adds greatly to overhead since multiple calls to USPS are required const xIndividualPackages="No" ' ' If you want the supplier to be used as the shipping address Set this to Yes ' Works only in conjunction with xIndividualpackages=Yes ' The zip code is atken from the supplier record if it exists ' and the other1 field is also filled in the supplier record (any value is OK) const xUseSupplierZip="No" ' const xAutoSeparatepackages="No" ' If weight is greater than 150, then auto separate packages ' Does not apply to individual packages const xAutoseparateWeight=150 ' ' Yes means it is an error if total weight is 0, No means shipping cost=0 ' const xzeroweightError="Yes" ' 'Set to 1 if sent to Residential address. 0 means commercial address const Residentialind=0 ' ' Set to Yes to see various phases of USPS calculation ' Used in conjunction with VP-ASP support staff const xTrace="No" ' Disclaimer This code is provided ASIS. It is up to you to determine if the rates reported by USPS are correct. Virtual Programming has no association with USPS. USPS may withdraw or alter this service at any time. Virtual Programming does NOT guarantee to support changes that USPS makes to their real time Online tools or to current or future USPS online tools or rating and Service Selection ----------------------------------------------------------------------------- VP-ASP IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. Virtual Programming DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL Virtual Programming OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES. ----------------------------------------------------------------------------- LICENSEE ACCEPTS VP-ASP Shopping Cart "AS IS" "WITH ALL FAULTS", Virtual Programming accepts no responsibility for the operation or performance of the VP-ASP Shopping Cart. The entire risk of use and consequences of use of VP-ASP Shopping Cart falls completely on the Licensee and Virtual Programming shall not be liable in any respect for any claims loss or injury alleged to have resulted from use of or in reliance on VP-ASP Shopping Cart. Licensee acknowledges that it has read the foregoing disclaimers of warranty and limitation of liability and understands that Licensee assumes the entire risk of using VP-ASP Shopping Cart.