foreach ($maxServiceWeights as $code => $weight) { $shipAPI->setMaxServiceWeight($code, $weight); } //********************************************************************** // Set Maximum Package Dimensions per service for package splits: OPTIONAL // (Default is dervived maximum service volume as established by carrier) // This setting will not exclude items which exceed values; it governs // when to split to the next package // (settings higher than service maximum are ignored) // (typically fed in from your seller account configuration) //********************************************************************** // Length-Width-Height $maxServiceDimensions = array('UPSGND' => "20-15-12", 'UPS3DS' => "20-15-12", 'UPS2DA' => "20-15-12", 'UPSNDS' => "20-15-12", 'UPSNDA' => "20-15-12", 'FDXGND' => "20-15-12", 'FDX2D' => "20-15-12", 'FDXES' => "20-15-12", 'FDXFO' => "20-15-12", 'USPPP' => "12-15-12", 'USPPM' => "12-15-12", 'USPMM' => "12-15-12", 'USPEXP' => "12-15-12"); foreach ($maxServiceDimensions as $code => $dims) { $dim = explode("-", $dims); $shipAPI->setMaxServiceLength($code, trim($dim[0])); $shipAPI->setMaxServiceWidth($code, trim($dim[1])); $shipAPI->setMaxServiceHeight($code, trim($dim[2])); } //************************************************************ // Flag Carrier for Flat Rate Box Qualification: OPTIONAL // Item Dimensions are required // AuctionInc will price service at the better of the // flat (if item/s fit) or calcluated rate // USPS (Priority Mail (boxes, envelopes), Express Mail (envelopes) // -- valid values: PKG / ENV / ALL // FEDEX (International Priority (boxes) // -- valid values: PKG // (typically fed in from your seller account configuration) //************************************************************ $shipAPI->setFlatRatePackaging("USPS", 'PKG');