'PRIORITY',
'zip_origin' => '10022',
'zip_dest' => '20008',
'pounds' => '10',
'ounces' => '5',
'size' => 'REGULAR',
'container' => 'Flat Rate Box'
);
$package2 = array(
'service' => 'All',
'zip_origin' => '10022',
'zip_dest' => '20008',
'pounds' => '10',
'ounces' => '5',
'size' => 'LARGE',
'machinable' => 'TRUE'
);
$package3 = array(
'pounds' => '2',
'ounces' => '0',
'mail_type' => 'Package',
'country' => 'Albania'
);
$package4 = array(
'pounds' => '0',
'ounces' => '1',
'mail_type' => 'Postcards or Aerogrammes',
'country' => 'Algeria'
);
?>
![](logo.gif)
add_package($package1) && $module['debug']==0) die("Failed to add the package");
$usps->submit_request();
$rates = $usps->get_rates(0);
$usps->get_package_error(0);
?>
USPS Server Domestic Test 1 - Actual Results |
$value){
echo "";
echo "".$key." | ";
echo "".sprintf("%.2f",$value)." | ";
echo "
\n";
}
$successful = 1;
}
?>
USPS Server Domestic Test 2 - Actual Results |
reset();
// Initiate the USPS Class
$usps = new USPS($module['username'], $module['password'], $api);
if(!$usps->add_package($package2) && $module['debug']==0) die("Failed to add the package");
$usps->submit_request();
$rates = $usps->get_rates(0);
$usps->get_package_error(0);
if(is_array($rates)){
foreach($rates as $key => $value){
echo "";
echo "".$key." | ";
echo "".sprintf("%.2f",$value)." | ";
echo "
\n";
}
$successful = 2;
}
?>
USPS Server International Test 1 - Actual Results |
reset();
$api = "IntlRate";
// Initiate the USPS Class
$usps = new USPS($module['username'], $module['password'], $api);
if(!$usps->add_package($package3) && $module['debug']==0) die("Failed to add the package");
$usps->submit_request();
$rates = $usps->get_rates(0);
$usps->get_package_error(0);
if(is_array($rates)){
foreach($rates as $key => $value){
echo "";
echo "".$key." | ";
echo "".sprintf("%.2f",$value)." | ";
echo "
\n";
}
$successful = 3;
}
?>
USPS Server International Test 2 - Actual Results |
reset();
// Initiate the USPS Class
$usps = new USPS($module['username'], $module['password'], $api);
if(!$usps->add_package($package4) && $module['debug']==0) die("Failed to add the package");
$usps->submit_request();
$rates = $usps->get_rates(0);
$usps->get_package_error(0);
if(is_array($rates)){
foreach($rates as $key => $value){
echo "";
echo "".$key." | ";
echo "".sprintf("%.2f",$value)." | ";
echo "
\n";
}
$successful = 4;
}
?>
Now, email USPS at icustomercare@usps.com or
call them at 1-800-344-7779 (7:00 AM to 11:00 PM EST daily) and they will activate your account to use the live server.