echo "State = " . $State;
 echo "\r\n";
 echo "PostalCode = " . $PostalCode;
 echo "\r\n";
 echo "Country = " . $Country;
 echo "\r\n";
 echo "MagentoShipCode = " . $MagentoShipCode;
 echo "\r\n";
 echo "ShippingDescription = " . $MagentoShipDescription;
 echo "\r\n";
 echo "ShippingMethod2 = " . $ShippingMethod2;
 echo "\r\n";
 echo "Total paid = " . $myOrder->getTotal_paid();
 echo "\r\n";
 // prepare order to send to PA
 $paOrder = new paAPI();
 //construct paAPI class
 $paOrder->setUser($uid, $pass);
 //api account username and pass
 // $paOrder->setClient("Sample Client v1");//passes the name of the connection client *optional*
 $paOrder->setAccountNum($config_info['login']['paAccountNum']);
 $paOrder->set_cust_name($CustomerName);
 //ship to name
 $paOrder->set_ship_add1($Address[0]);
 //ship to address1
 if ($CountryId == "US" || $CountryId == "CA") {
     if ($Address[1]) {
         $paOrder->set_ship_add2($Address[1]);
         //ship to address2
     }
     $paOrder->set_ship_city($City);
 echo "\r\n";
 echo "PostalCode = ".$PostalCode;
 echo "\r\n";
 echo "Country = ".$Country;
 echo "\r\n";
 echo "MagentoShipCode = ".$MagentoShipCode;
 echo "\r\n";
 echo "ShippingDescription = ".$MagentoShipDescription;
 echo "\r\n";
 echo "ShippingMethod2 = ".$ShippingMethod2;
 echo "\r\n";
 echo "Total paid = ".$myOrder->getTotal_paid();
 echo "\r\n";
 */
 // prepare order to send to PA
 $paOrder = new paAPI();
 //construct paAPI class
 $paOrder->setUser($uid, $pass);
 //api account username and pass
 // $paOrder->setClient("Sample Client v1");//passes the name of the connection client *optional*
 $paOrder->setAccountNum($config_info['login']['paAccountNum']);
 $paOrder->set_cust_name(normalize_special_characters($CustomerName));
 //ship to name
 $paOrder->set_ship_add1(normalize_special_characters($Address[0]));
 //ship to address1
 if ($CountryId == "US" || $CountryId == "CA") {
     if ($Address[1]) {
         $paOrder->set_ship_add2(normalize_special_characters($Address[1]));
         //ship to address2
     }
     $paOrder->set_ship_city(normalize_special_characters($City));
<?

//Error reporting
ini_set('display_errors', 1);
error_reporting(E_ALL); 


require_once('paAPI_test.php');
$order = new paAPI();//construct paAPI class
$order->setUser('ndap_llc','mozllc');//api account username and pass
$order->setAccountNum('64366');
// $order->setClient("Sample Client v1");//passes the name of the connection client *optional*
$order->set_cust_name('M Мiхail Slеpcоv');//ship to name
$order->set_ship_add1('Осtуzhеva, 5a, 201 ');//ship to address1
$order->set_ship_add2('M');//ship to address2
$order->set_ship_city('Вороnеzh');//ship to city
$order->set_ship_state('Россia');//ship to state
$order->set_ship_zip('11205');//ship to postal code
$order->set_ship_meth('FDG');//ship method FDG=Ground, FD2=2nd Day, FDO=Overnight
$order->set_order_num('28');//customer PO#
$order->set_ship_country('RU');//ship to country code
// $order->set_conf_number($ConfNumber);//confirmation from DST
// $order->set_paypal_number($BTN);//paypal reference number
// $order->set_tax_amount($TAX);//tax on order
// $order->set_ship_amount($HSC);//calculated shipping cost of order


///pass line item information
$order->addItem(array('line_code'=>'vg','part_num'=>'JV8','quantity'=>2,'cost'=>3.16));
$order->set_status('test');//takes either ('test') or ('live')
<?
require_once('paAPI.php');
$order = new paAPI();//construct paAPI class
$order->setUser('username','pass');//api account username and pass
$order->setClient("Sample Client v1");//passes the name of the connection client *optional*
$order->set_cust_name($CustomerName);//ship to name
$order->set_ship_add1($Address1);//ship to address1
$order->set_ship_add2($Address2);//ship to address2
$order->set_ship_city($City);//ship to city
$order->set_ship_state($State);//ship to state
$order->set_ship_zip($PostalCode);//ship to postal code
$order->set_ship_meth($ShippingMethod2);//ship method FDG=Ground, FD2=2nd Day, FDO=Overnight
$order->set_order_num($PONumber);//customer PO#
$order->set_ship_country('US');//ship to country code
$order->set_conf_number($ConfNumber);//confirmation from DST
$order->set_paypal_number($BTN);//paypal reference number
$order->set_tax_amount($TAX);//tax on order
$order->set_ship_amount($HSC);//calculated shipping cost of order


///pass line item information
$order->addItem(array('line_code'=>$lc1,'part_num'=>$part1,'quantity'=>$qty1,'cost'=>$cost1));
$order->addItem(array('line_code'=>$lc2,'part_num'=>$part2,'quantity'=>$qty2,'cost'=>$cost2));
$order->addItem(array('line_code'=>$lc3,'part_num'=>$part3,'quantity'=>$qty3,'cost'=>$cost3));
$order->set_status('test');//takes either ('test') or ('live')
$ret = json_decode($order->sendOrder('enterOrder'));//order entry response in json string
?>