Example #1
0
 function formatAddress($params)
 {
     $addy['companyName'] = isset($params->companyName) ? $params->companyName : '';
     $addy['attentionName'] = isset($params->firstname) ? $params->firstname : '';
     $addy['attentionName'] .= isset($params->lastname) ? $params->lastname : '';
     $addy['address1'] = isset($params->address1) ? $params->address1 : '';
     $addy['address2'] = isset($params->address2) ? $params->address2 : '';
     $addy['address3'] = isset($params->address3) ? $params->address3 : '';
     $addy['city'] = isset($params->city) ? $params->city : '';
     $addy['state'] = isset($params->state) ? geoRegion::getAbbrev($params->state) : '';
     $addy['countryCode'] = isset($params->state) ? geoRegion::getCountryCode($params->state) : '';
     $addy['postalCode'] = isset($params->zip) ? $params->zip : '';
     $addy['phone'] = isset($params->phone) ? $params->phone : '';
     return $addy;
 }
Example #2
0
 function formatAddress($params)
 {
     $addy['Streetlines'][] = $params->address1;
     if (isset($params->address2)) {
         $addy['Streetlines'][] = $params->address2;
     }
     $addy['City'] = isset($params->city) ? $params->city : '';
     $addy['StateOrProvinceCode'] = isset($params->state) ? geoRegion::getAbbrev($params->state) : '';
     $addy['CountryCode'] = isset($params->state) ? geoRegion::getCountryCode($params->state) : '';
     $addy['PostalCode'] = isset($params->zip) ? $params->zip : '';
     return $addy;
 }