Beispiel #1
0
$objCustomerLogin = new CustomerLogin();
//customer session is checked whether it is valid or not
if (!$objCustomerLogin->checkCustomerSession()) {
    header('location:login.php');
    die;
}
if (isset($_SESSION['sessCartDetails'])) {
    $arrCartDetails = $_SESSION['sessCartDetails'];
    //$_SESSION['sessCartDetails']= array();
    require "components/ups/usps.php";
    $usps = new USPS();
    $usps->setServer("http://Production.ShippingAPIs.com/ShippingAPI.dll");
    $usps->setUserName("760BODYZ6562");
    $usps->setService("All");
    $usps->setOrigZip("30076");
    $usps->setContainer("Flat Rate Box");
    $usps->setMachinable("true");
    $usps->setSize("LARGE");
}
//Code for getting Billing Details
$arrCols = array('CustomerFirstName', 'CustomerLastName', 'CustomerEmailID', 'CustomerPhone', 'CustomerAddressOne', 'CustomerAddressTwo', 'CustomerCountry', 'CustomerState', 'CustomerCity', 'CustomerZipcode', 'CustomerShippingPhone', 'CustomerShippingAddressOne', 'CustomerShippingAddressTwo', 'CustomerShippingCountry', 'CustomerShippingState', 'CustomerShippingCity', 'CustomerShippingZipcode', 'CustomerIsAddressSame');
//$varTable = TABLE_CUSTOMERS.' INNER JOIN '.TABLE_CARD_INFO.' ON '.TABLE_CUSTOMERS.'.pkCustomerID ='.TABLE_CARD_INFO.'.fkCustomerID';
$varWhere = 'pkCustomerID = \'' . $_SESSION['sessCustomerID'] . '\'';
$arrCustomerRecord = $objGeneral->getRecord(TABLE_CUSTOMERS, $arrCols, $varWhere);
@extract($arrCustomerRecord[0]);
//Listing countries
$arrColumns = array('CountryName', 'pkCountryCode');
//$varWhere = ' 1 ';
$arrCountry = $objGeneral->getRecord(TABLE_COUNTRIES, $arrColumns, '1', 'CountryName ASC');
//getting credit card expiry month,year and date
$arr_month_full = array(1 => 'January', 2 => 'February', 3 => 'March', 4 => 'April', 5 => 'May', 6 => 'June', 7 => 'July', 8 => 'August', 9 => 'September', 10 => 'October', 11 => 'November', 12 => 'December');