$shipAPI->useCurl(false); //************************************************************ // Set the Detail Level (1, 2 or 3) (Default = 1) // DL 1: minimum required data returned // DL 2: shipping rate components included // DL 3: package-level detail included //************************************************************ $detailLevel = 3; $shipAPI->setDetailLevel($detailLevel); //************************************************************ // Set Currency // Determines the currency of the returned rates // as well as the expected currency of any monetary values set in your call // (declared value, item handling fee, fixed fees) //************************************************************ $shipAPI->setCurrency("USD"); // Show table of any errors for inspection for this example script $showErrors = true; //************************************************************ // Set Destination Address for this API call // (These values would typically come from your cart) //************************************************************ $destCountryCode = 'US'; $destPostalCode = '90210'; $residential = true; $shipAPI->setDestinationAddress($destCountryCode, $destPostalCode, '', $residential); //************************************************************ // Example Items // (Item data would typically be fed in from your cart) //************************************************************ // Create an array of items to rate