public static function getTaxInfoByUserSidAndPrice($user_sid, $price) { $user = SJB_UserManager::getObjectBySID($user_sid); $location = $user->getPropertyValue('Location'); $tax_info = SJB_TaxesManager::getTaxInfoByCountryAndState(SJB_Array::get($location, 'Country'), SJB_Array::get($location, 'State')); $empty_tax_info = array('sid' => '', 'tax_name' => '', 'price_includes_tax' => 0, 'tax_rate' => 0); $tax_info = array_merge($empty_tax_info, $tax_info); $tax_info['tax_amount'] = SJB_TaxesManager::getTaxAmount($price, $tax_info['tax_rate'], $tax_info['price_includes_tax']); return $tax_info; }