Guest Posted September 7, 2008 Posted September 7, 2008 I have a problem. My cart seems to recognize the weights and it puts the correct shipping amount on my checkout through U.S.P.S. but when I try to pay through paypal, It has me log into paypal, and it shows the total amount, then when I click continue it give me this error message. { Fatal error: Class 'httpClient' not found in /home/predator/public_html/callstore/includes/modules/shipping/usps.php on line 359 } I have an account through U.S.P.S. and I called them and had them switch me to production. I can't figure out where the problem is. Here is my codes. Thanks in advance for the help. Aaron Glenn <?php /* Updated by Joseph McMurry to add Service Committment (Delivery Time by USPS) [email protected] http://www.mcmwebsite.com Copyright © 2008 MCM Web Solutions Insurance code added from module by Kevin Shelton $Id: usps.php osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License published by the Free Software Foundation; You may not change or alter any portion of this comment or credits of supporting developers from this source code or any supporting source code which is considered copyrighted © material of the original comment or credit authors. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ //define('MODULE_SHIPPING_USPS_TEXT_OPT_MM', 'Media Mail'); class usps { var $code, $title, $description, $icon, $enabled, $countries; // class constructor function usps() { global $order; $this->code = 'usps'; $this->title = MODULE_SHIPPING_USPS_TEXT_TITLE; $this->description = MODULE_SHIPPING_USPS_TEXT_DESCRIPTION; $this->sort_order = MODULE_SHIPPING_USPS_SORT_ORDER; $this->icon = DIR_WS_ICONS . 'shipping_usps.gif'; $this->tax_class = MODULE_SHIPPING_USPS_TAX_CLASS; $this->enabled = ((MODULE_SHIPPING_USPS_STATUS == 'True') ? true : false); $this->mcmDomesticIdArray = array(4, 88, 172, 223, 224, 232); if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_USPS_ZONE > 0) ) { $check_flag = false; $check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_USPS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id"); while ($check = tep_db_fetch_array($check_query)) { if ($check['zone_id'] < 1) { $check_flag = true; break; } elseif ($check['zone_id'] == $order->delivery['zone_id']) { $check_flag = true; break; } } if ($check_flag == false) { $this->enabled = false; } } $my_country = $order->delivery['country']['id']; if ( in_array($my_country, $this->mcmDomesticIdArray) ) { // United States (capitalize all) $this->types = array('EXPRESS' => 'Express Mail', 'FIRST CLASS' => 'First-Class Mail', 'PRIORITY' => 'Priority Mail', 'PARCEL' => 'Parcel Post'); } else { // international // V.3 of WebTools API (MAY 14, 2007 on) $this->intl_types = array( 'Express Mail Int' => 'Express Mail International (EMS)', 'Priority Mail Int' => 'Priority Mail International', 'Priority Mail Int Flat Rate Env' => 'Priority Mail International Flat Rate Envelope' ); // end v.3 change } $this->countries = $this->country_list(); $this->countryinsure = $this->country_maxinsure(); } // class methods function quote($method = '') { global $order, $shipping_weight, $shipping_num_boxes; $my_country = $order->delivery['country']['id']; if ( in_array($my_country, $this->mcmDomesticIdArray) ) { // United States, American Samoa, Puerto Rico, etc. if ( tep_not_null($method) && (isset($this->types[$method]) || in_array($method, $this->types)) ) { $this->_setService($method); } //print "US<br>"; } else { // international $this->types = $this->intl_types; if ( tep_not_null($method) && ( in_array($method, $this->intl_types) ) ) { $this->_setService($method); //print "method=$method"; } //print "Int<br>"; } $this->_setMachinable('False'); $this->_setContainer('None'); $this->_setSize('REGULAR'); // Insurance module by Kevin Shelton // divide the value of the order among the packages based on the order total or subtotal depending on whether or not you have configured to insure tax if (MODULE_SHIPPING_USPS_INSURE_TAX == 'True') { $costperpkg = $order->info['total'] / $shipping_num_boxes;} else { $costperpkg = $order->info['subtotal'] / $shipping_num_boxes;} // retrieve the maximum allowed insurance for the destination country and if the package value exceeds it then set package value to the maximum allowed $maxins = $this->countryinsure[$order->delivery['country']['iso_code_2']]; if ($costperpkg > $maxins) $costperpkg = $maxins; // if insurance not allowed for destination or insurance is turned off add nothing to shipping cost if (($maxins == 0) || (MODULE_SHIPPING_USPS_INSURE == 'False')) { $insurance = 0; } // US and Canada share the same insurance calculation (though not the same maximum) else if (($order->delivery['country']['iso_code_2'] == 'US') || ($order->delivery['country']['iso_code_2'] == 'CA')){ if ($costperpkg<=50) { $insurance=MODULE_SHIPPING_USPS_INS1;} else if ($costperpkg<=100) { $insurance=MODULE_SHIPPING_USPS_INS2;} else { $insurance = MODULE_SHIPPING_USPS_INS2 + ((ceil($costperpkg/100) - 1) * MODULE_SHIPPING_USPS_INS3); } } // if insurance allowed and is not US or Canada then calculate international insurance else { if ($costperpkg<=50) { $insurance=MODULE_SHIPPING_USPS_INS4;} else if ($costperpkg<=100) { $insurance=MODULE_SHIPPING_USPS_INS5;} else { $insurance = MODULE_SHIPPING_USPS_INS5 + ((ceil($costperpkg/100) - 1) * MODULE_SHIPPING_USPS_INS6); } } // usps doesnt accept zero weight $shipping_weight = ($shipping_weight < 1 ? 0.94 : $shipping_weight); $shipping_pounds = floor ($shipping_weight); $shipping_ounces = round(16 * ($shipping_weight - floor($shipping_weight))); $this->_setWeight($shipping_pounds, $shipping_ounces); //print "<br>weight=$shipping_weight<br>pounds=$shipping_pounds<br>oz=$shipping_ounces<br>"; // DEBUG CODE list($uspsQuote, $etas) = $this->_getQuote(); if (is_array($uspsQuote)) { if (isset($uspsQuote['error'])) { $this->quotes = array('module' => $this->title, 'error' => $uspsQuote['error']); } else { $this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ' x ' . $shipping_weight . 'lbs)'); $methods = array(); $size = sizeof($uspsQuote); for ($i=0; $i<$size; $i++) { list($type, $cost) = each($uspsQuote[$i]); $eta = $etas[$i]; $methods[] = array('id' => $type, 'title' => ((isset($this->types[$type])) ? $this->types[$type]." $eta" : $type." $eta"), 'cost' => ($cost + $insurance + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes); } $this->quotes['methods'] = $methods; if ($this->tax_class > 0) { $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']); } } } else { $this->quotes = array('module' => $this->title, 'error' => MODULE_SHIPPING_USPS_TEXT_ERROR); } if (tep_not_null($this->icon)) $this->quotes['icon'] = tep_image($this->icon, $this->title); return $this->quotes; } function check() { if (!isset($this->_check)) { $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_USPS_STATUS'"); $this->_check = tep_db_num_rows($check_query); } return $this->_check; } function install() { tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable USPS Shipping', 'MODULE_SHIPPING_USPS_STATUS', 'True', 'Do you want to offer USPS shipping?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Enter the USPS User ID', 'MODULE_SHIPPING_USPS_USERID', 'NONE', 'Enter the USPS USERID assigned to you.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Enter the USPS Password', 'MODULE_SHIPPING_USPS_PASSWORD', 'NONE', 'See USERID, above.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Which server to use', 'MODULE_SHIPPING_USPS_SERVER', 'production', 'An account at USPS is needed to use the Production server', '6', '0', 'tep_cfg_select_option(array(\'test\', \'production\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Handling Fee', 'MODULE_SHIPPING_USPS_HANDLING', '0', 'Handling fee for this shipping method.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_USPS_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_USPS_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_USPS_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('US/Canada to $50', 'MODULE_SHIPPING_USPS_INS1', '1.30', 'US/Canada insurance total up to $50', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('US/Canada $50-100', 'MODULE_SHIPPING_USPS_INS2', '2.20', 'US/Canada insurance for totals $50.01-$100', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('US/Canada per $100', 'MODULE_SHIPPING_USPS_INS3', '1.00', 'US/Canada for every $100 over $100 add $', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('International to $50', 'MODULE_SHIPPING_USPS_INS4', '1.85', 'International insurance total up to $50', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('International $50-100', 'MODULE_SHIPPING_USPS_INS5', '2.60', 'International insurance for totals $50.01-$100', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('International per $100', 'MODULE_SHIPPING_USPS_INS6', '1.00', 'International for every $100 over $100 add $', '6', '0', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Insure Packages', 'MODULE_SHIPPING_USPS_INSURE', 'True', 'Insure packages shipped by USPS?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Insure Tax', 'MODULE_SHIPPING_USPS_INSURE_TAX', 'True', 'Insure tax on packages shipped by USPS?', '6', '0', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); } function remove() { tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_SHIPPING_USPS_STATUS', 'MODULE_SHIPPING_USPS_USERID', 'MODULE_SHIPPING_USPS_PASSWORD', 'MODULE_SHIPPING_USPS_SERVER', 'MODULE_SHIPPING_USPS_HANDLING', 'MODULE_SHIPPING_USPS_TAX_CLASS', 'MODULE_SHIPPING_USPS_ZONE', 'MODULE_SHIPPING_USPS_SORT_ORDER', 'MODULE_SHIPPING_USPS_INS1', 'MODULE_SHIPPING_USPS_INS2', 'MODULE_SHIPPING_USPS_INS3','MODULE_SHIPPING_USPS_INS4', 'MODULE_SHIPPING_USPS_INS5', 'MODULE_SHIPPING_USPS_INS6','MODULE_SHIPPING_USPS_PEONLY','MODULE_SHIPPING_USPS_INSURE','MODULE_SHIPPING_USPS_INSURE_TAX'); } function _setService($service) { $this->service = $service; } function _setWeight($pounds, $ounces=0) { $this->pounds = $pounds; $this->ounces = $ounces; } function _setContainer($container) { $this->container = $container; } function _setSize($size) { $this->size = $size; } function _setMachinable($machinable) { $this->machinable = $machinable; } function _getQuote() { global $order; $org_zip = SHIPPING_ORIGIN_ZIP; if ( in_array($order->delivery['country']['id'], $this->mcmDomesticIdArray) ) { $request = '<RateRequest USERID="' . MODULE_SHIPPING_USPS_USERID . '" PASSWORD="' . MODULE_SHIPPING_USPS_PASSWORD . '">'; $services_count = 0; if (isset($this->service)) { $this->types = array($this->service => $this->types[$this->service]); } $dest_zip = str_replace(' ', '', $order->delivery['postcode']); if ($order->delivery['country']['iso_code_2'] == 'US') $dest_zip = substr($dest_zip, 0, 5); reset($this->types); if ( ($this->pounds) < 1 ) { //$this->types = $this->intl_types; $this->intl_types = array( 'Express Mail Int' => 'Express Mail International (EMS)', 'Priority Mail Int Flat Rate Env' => 'Priority Mail International Flat Rate Envelope' ); } else { $this->intl_types = array( 'Express Mail Int' => 'Express Mail International (EMS)', 'Priority Mail Int' => 'Priority Mail International' ); } while (list($key, $value) = each($this->types)) { $request .= '<Package ID="' . $services_count . '">' . '<Service>' . $key . '</Service>' . '<ZipOrigination>'. $org_zip .'</ZipOrigination>' . '<ZipDestination>' . $dest_zip . '</ZipDestination>' . '<Pounds>' . $this->pounds . '</Pounds>' . '<Ounces>' . $this->ounces . '</Ounces>' . '<Container>' . $this->container . '</Container>' . '<Size>' . $this->size . '</Size>' . '<Machinable>' . $this->machinable . '</Machinable>' . '</Package>'; $services_count++; } $request .= '</RateRequest>'; $request = 'API=Rate&XML=' . urlencode($request); } else { /* $allowed_types = $this->intl_types; if ( in_array($key, $allowed_types) ) { */ $request = '<IntlRateRequest USERID="' . MODULE_SHIPPING_USPS_USERID . '" PASSWORD="' . MODULE_SHIPPING_USPS_PASSWORD . '">' . '<Package ID="0">' . '<Pounds>' . $this->pounds . '</Pounds>' . '<Ounces>' . $this->ounces . '</Ounces>' . '<MailType>Package</MailType>' . '<Country>' . $this->countries[$order->delivery['country']['iso_code_2']] . '</Country>' . '</Package>' . '</IntlRateRequest>'; $request = 'API=IntlRate&XML=' . urlencode($request); //} } switch (MODULE_SHIPPING_USPS_SERVER) { case 'production': $usps_server = 'production.shippingapis.com'; $api_dll = 'shippingapi.dll'; break; case 'test': default: $usps_server = 'http://stg-production.shippingapis.com/'; // changed 5/15/2007 'testing.shippingapis.com'; $api_dll = 'shippingapi.dll'; // changed 5/15/2007 'ShippingAPITest.dll'; break; } $body = ''; $http = new httpClient(); if ($http->Connect($usps_server, 80)) { $http->addHeader('Host', $usps_server); $http->addHeader('User-Agent', 'osCommerce'); $http->addHeader('Connection', 'Close'); if ($http->Get('/' . $api_dll . '?' . $request)) $body = $http->getBody(); //print_r("<br>request=$request"); // DEBUG CODE $http->Disconnect(); } else { return false; } $response = array(); while (true) { if ($start = strpos($body, '<Package ID=')) { $body = substr($body, $start); $end = strpos($body, '</Package>'); $response[] = substr($body, 0, $end+10); //$my_response = substr($body, 0, $end+10); // DEBUG CODE //print_r("<br>response=$my_response"); // DEBUG CODE $body = substr($body, $end+9); } else { break; } } $rates = array(); $etas = array(); if (in_array($order->delivery['country']['id'], $this->mcmDomesticIdArray)) { if (sizeof($response) == '1') { if (ereg('<Error>', $response[0])) { $number = ereg('<Number>(.*)</Number>', $response[0], $regs); $number = $regs[1]; $description = ereg('<Description>(.*)</Description>', $response[0], $regs); $description = $regs[1]; return array('error' => $number . ' - ' . $description); } } $n = sizeof($response); for ($i=0; $i<$n; $i++) { if (strpos($response[$i], '<Postage>')) { $service = ereg('<Service>(.*)</Service>', $response[$i], $regs); $service = $regs[1]; $postage = ereg('<Postage>(.*)</Postage>', $response[$i], $regs); $postage = $regs[1]; $rates[] = array($service => $postage); } } } else { if (ereg('<Error>', $response[0])) { $number = ereg('<Number>(.*)</Number>', $response[0], $regs); $number = $regs[1]; $description = ereg('<Description>(.*)</Description>', $response[0], $regs); $description = $regs[1]; return array('error' => $number . ' - ' . $description); } else { $body = $response[0]; $services = array(); while (true) { if ($start = strpos($body, '<Service ID=')) { $body = substr($body, $start); $end = strpos($body, '</Service>'); $services[] = substr($body, 0, $end+10); $body = substr($body, $end+9); } else { break; } } if ( ($this->pounds) < 1 ) { $this->intl_types = array( 'Express Mail Int' => 'Express Mail International (EMS)', 'Priority Mail Int Flat Rate Env' => 'Priority Mail International Flat Rate Envelope' ); } else { $this->intl_types = array( 'Express Mail Int' => 'Express Mail International (EMS)', 'Priority Mail Int' => 'Priority Mail International' ); } $allowed_types = $this->intl_types; $size = sizeof($services); for ($i=0, $n=$size; $i<$n; $i++) { if (strpos($services[$i], '<Postage>')) { $service = ereg('<SvcDescription>(.*)</SvcDescription>', $services[$i], $regs); $service = $regs[1]; $mcm_eta = ereg('<SvcCommitments>(.*)</SvcCommitments>', $services[$i], $regs); $mcm_eta = $regs[1]; $postage = ereg('<Postage>(.*)</Postage>', $services[$i], $regs); $postage = $regs[1]; if( !in_array($service, $allowed_types) ) continue; if (isset($this->service) && ($service != $this->service) ) { continue; } $etas[] = $mcm_eta; $rates[] = array($service => $postage); } } } } return ((sizeof($rates) > 0) ? array($rates, $etas) : false); } function country_list() { $list = array('AF' => 'Afghanistan', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AD' => 'Andorra', 'AO' => 'Angola', 'AI' => 'Anguilla', 'AG' => 'Antigua and Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaijan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BJ' => 'Benin', 'BM' => 'Bermuda', 'BT' => 'Bhutan', 'BO' => 'Bolivia', 'BA' => 'Bosnia-Herzegovina', 'BW' => 'Botswana', 'BR' => 'Brazil', 'VG' => 'British Virgin Islands', 'BN' => 'Brunei Darussalam', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'MM' => 'Burma', 'BI' => 'Burundi', 'KH' => 'Cambodia', 'CM' => 'Cameroon', 'CA' => 'Canada', 'CV' => 'Cape Verde', 'KY' => 'Cayman Islands', 'CF' => 'Central African Republic', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CX' => 'Christmas Island (Australia)', 'CC' => 'Cocos Island (Australia)', 'CO' => 'Colombia', 'KM' => 'Comoros', 'CG' => 'Congo (Brazzaville),Republic of the', 'ZR' => 'Congo, Democratic Republic of the', 'CK' => 'Cook Islands (New Zealand)', 'CR' => 'Costa Rica', 'CI' => 'Cote d\'Ivoire (Ivory Coast)', 'HR' => 'Croatia', 'CU' => 'Cuba', 'CY' => 'Cyprus', 'CZ' => 'Czech Republic', 'DK' => 'Denmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'TP' => 'East Timor (Indonesia)', 'EC' => 'Ecuador', 'EG' => 'Egypt', 'SV' => 'El Salvador', 'GQ' => 'Equatorial Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Ethiopia', 'FK' => 'Falkland Islands', 'FO' => 'Faroe Islands', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'France', 'GF' => 'French Guiana', 'PF' => 'French Polynesia', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia, Republic of', 'DE' => 'Germany', 'GH' => 'Ghana', 'GI' => 'Gibraltar', 'GB' => 'Great Britain and Northern Ireland', 'GR' => 'Greece', 'GL' => 'Greenland', 'GD' => 'Grenada', 'GP' => 'Guadeloupe', 'GT' => 'Guatemala', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungary', 'IS' => 'Iceland', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Iran', 'IQ' => 'Iraq', 'IE' => 'Ireland', 'IL' => 'Israel', 'IT' => 'Italy', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JO' => 'Jordan', 'KZ' => 'Kazakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KW' => 'Kuwait', 'KG' => 'Kyrgyzstan', 'LA' => 'Laos', 'LV' => 'Latvia', 'LB' => 'Lebanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libya', 'LI' => 'Liechtenstein', 'LT' => 'Lithuania', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Macedonia, Republic of', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldives', 'ML' => 'Mali', 'MT' => 'Malta', 'MQ' => 'Martinique', 'MH' => 'Marshall Islands, Republic of', 'MR' => 'Mauritania', 'MU' => 'Mauritius', 'YT' => 'Mayotte (France)', 'MX' => 'Mexico', 'MD' => 'Moldova', 'MC' => 'Monaco (France)', 'MN' => 'Mongolia', 'MS' => 'Montserrat', 'MA' => 'Morocco', 'MZ' => 'Mozambique', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Netherlands', 'AN' => 'Netherlands Antilles', 'NC' => 'New Caledonia', 'NZ' => 'New Zealand', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'KP' => 'North Korea (Korea, Democratic People\'s Republic of)', 'NO' => 'Norway', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PA' => 'Panama', 'PG' => 'Papua New Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Philippines', 'PN' => 'Pitcairn Island', 'PL' => 'Poland', 'PT' => 'Portugal', 'QA' => 'Qatar', 'RE' => 'Reunion', 'RO' => 'Romania', 'RU' => 'Russia', 'RW' => 'Rwanda', 'SH' => 'Saint Helena', 'KN' => 'Saint Kitts (St. Christopher and Nevis)', 'LC' => 'Saint Lucia', 'PM' => 'Saint Pierre and Miquelon', 'VC' => 'Saint Vincent and the Grenadines', 'SM' => 'San Marino', 'ST' => 'Sao Tome and Principe', 'SA' => 'Saudi Arabia', 'SN' => 'Senegal', 'YU' => 'Serbia-Montenegro', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovak Republic', 'SI' => 'Slovenia', 'SB' => 'Solomon Islands', 'SO' => 'Somalia', 'ZA' => 'South Africa', 'GS' => 'South Georgia (Falkland Islands)', 'KR' => 'South Korea (Korea, Republic of)', 'ES' => 'Spain', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SZ' => 'Swaziland', 'SE' => 'Sweden', 'CH' => 'Switzerland', 'SY' => 'Syrian Arab Republic', 'TW' => 'Taiwan', 'TJ' => 'Tajikistan', 'TZ' => 'Tanzania', 'TH' => 'Thailand', 'TG' => 'Togo', 'TK' => 'Tokelau (Union) Group (Western Samoa)', 'TO' => 'Tonga', 'TT' => 'Trinidad and Tobago', 'TN' => 'Tunisia', 'TR' => 'Turkey', 'TM' => 'Turkmenistan', 'TC' => 'Turks and Caicos Islands', 'TV' => 'Tuvalu', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'United Arab Emirates', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VA' => 'Vatican City', 'VE' => 'Venezuela', 'VN' => 'Vietnam', 'WF' => 'Wallis and Futuna Islands', 'WS' => 'Western Samoa', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe'); return $list; } function country_maxinsure() { $list = array('AF' => 0, 'AL' => 0, 'DZ' => 2185, 'AD' => 5000, 'AO' => 0, 'AI' => 415, 'AG' => 60, 'AR' => 5000, 'AM' => 1350, 'AW' => 830, 'AU' => 3370, 'AT' => 5000, 'AZ' => 5000, 'BS' => 2795, 'BH' => 0, 'BD' => 5000, 'BB' => 220, 'BY' => 1323, 'BE' => 5000, 'BZ' => 1600, 'BJ' => 170, 'BM' => 440, 'BT' => 440, 'BO' => 0, 'BA' => 5000, 'BW' => 145, 'BR' => 5000, 'VG' => 165, 'BN' => 4405, 'BG' => 1030, 'BF' => 530, 'MM' => 4045, 'BI' => 790, 'KH' => 0, 'CM' => 5000, 'CA' => 675, 'CV' => 0, 'KY' => 0, 'CF' => 4405, 'TD' => 440, 'CL' => 0, 'CN' => 1130, 'CX' => 3370, 'CC' => 3370, 'CO' => 0, 'KM' => 690, 'CG' => 1685, 'ZR' => 0, 'CK' => 980, 'CR' => 0, 'CI' => 5000, 'HR' => 5000, 'CU' => 0, 'CY' => 5000, 'CZ' => 5000, 'DK' => 5000, 'DJ' => 880, 'DM' => 0, 'DO' => 0, 'TP' => 0, 'EC' => 0, 'EG' => 1685, 'SV' => 0, 'GQ' => 0, 'ER' => 0, 'EE' => 2020, 'ET' => 1000, 'FK' => 510, 'FO' => 5000, 'FJ' => 600, 'FI' => 5000, 'FR' => 5000, 'GF' => 5000, 'PF' => 1015, 'GA' => 485, 'GM' => 2575, 'GE' => 1350, 'DE' => 5000, 'GH' => 5000, 'GI' => 5000, 'GB' => 857, 'GR' => 5000, 'GL' => 5000, 'GD' => 350, 'GP' => 5000, 'GT' => 0, 'GN' => 875, 'GW' => 21, 'GY' => 10, 'HT' => 0, 'HN' => 0, 'HK' => 5000, 'HU' => 5000, 'IS' => 5000, 'IN' => 2265, 'ID' => 0, 'IR' => 0, 'IQ' => 0, 'IE' => 5000, 'IL' => 0, 'IT' => 5000, 'JM' => 0, 'JP' => 5000, 'JO' => 0, 'KZ' => 5000, 'KE' => 815, 'KI' => 0, 'KW' => 1765, 'KG' => 1350, 'LA' => 0, 'LV' => 1350, 'LB' => 440, 'LS' => 440, 'LR' => 440, 'LY' => 0, 'LI' => 5000, 'LT' => 5000, 'LU' => 5000, 'MO' => 4262, 'MK' => 2200, 'MG' => 675, 'MW' => 50, 'MY' => 1320, 'MV' => 0, 'ML' => 950, 'MT' => 5000, 'MQ' => 5000, 'MR' => 635, 'MU' => 270, 'YT' => 5000, 'MX' => 0, 'MD' => 1350, 'MC' => 5000, 'MN' => 440, 'MS' => 2200, 'MA' => 5000, 'MZ' => 0, 'NA' => 4405, 'NR' => 220, 'NP' => 0, 'NL' => 5000, 'AN' => 830, 'NC' => 1615, 'NZ' => 980, 'NI' => 440, 'NE' => 810, 'NG' => 205, 'KP' => 0, 'NO' => 0, 'OM' => 575, 'PK' => 270, 'PA' => 0, 'PG' => 445, 'PY' => 0, 'PE' => 0, 'PH' => 270, 'PN' => 0, 'PL' => 1350, 'PT' => 5000, 'QA' => 2515, 'RE' => 5000, 'RO' => 5000, 'RU' => 5000, 'RW' => 0, 'SH' => 170, 'KN' => 210, 'LC' => 400, 'PM' => 5000, 'VC' => 130, 'SM' => 5000, 'ST' => 440, 'SA' => 0, 'SN' => 865, 'YU' => 5000, 'SC' => 0, 'SL' => 0, 'SG' => 4580, 'SK' => 5000, 'SI' => 4400, 'SB' => 0, 'SO' => 440, 'ZA' => 1760, 'GS' => 510, 'KR' => 5000, 'ES' => 5000, 'LK' => 35, 'SD' => 0, 'SR' => 535, 'SZ' => 560, 'SE' => 5000, 'CH' => 5000, 'SY' => 3080, 'TW' => 1350, 'TJ' => 1350, 'TZ' => 230, 'TH' => 1350, 'TG' => 2190, 'TK' => 295, 'TO' => 515, 'TT' => 930, 'TN' => 2200, 'TR' => 880, 'TM' => 675, 'TC' => 0, 'TV' => 4715, 'UG' => 0, 'UA' => 5000, 'AE' => 5000, 'UY' => 0, 'UZ' => 5000, 'VU' => 0, 'VA' => 5000, 'VE' => 0, 'VN' => 0, 'WF' => 1615, 'WS' => 295, 'YE' => 0, 'ZM' => 540, 'ZW' => 600, 'US' => 5000); return $list; } } ?>
Jan Zonjee Posted September 7, 2008 Posted September 7, 2008 I have a problem. My cart seems to recognize the weights and it puts the correct shipping amount on my checkout through U.S.P.S. but when I try to pay through paypal, It has me log into paypal, and it shows the total amount, then when I click continue it give me this error message. { Fatal error: Class 'httpClient' not found in /home/predator/public_html/callstore/includes/modules/shipping/usps.php on line 359 } This was fixed in newer versions of the standard usps.php file by looking first if the class is loaded, if not load: if (!class_exists('httpClient')) { include('includes/classes/http_client.php'); } $http = new httpClient(); // line 359 in your file likely
Recommended Posts
Archived
This topic is now archived and is closed to further replies.