Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Sales & Use Tax Basic

Zend_Service_StrikeIron_SalesUseTaxBasic provides a client for StrikeIron's Sales & Use Tax Basic service. For more information on this service, visit these StrikeIron resources:

The service contains two methods, getTaxRateUSA() and getTaxRateCanada(), that will retrieve sales and use tax data for the United States and Canada, respectively.

= new Zend_Service_StrikeIron(array('username' => 'your-username',
'password' => 'your-password'));

// Get a client for the Sales & Use Tax Basic service
$taxBasic $strikeIron->getService(array('class' => 'SalesUseTaxBasic'));

// Query tax rate for Ontario, Canada
$rateInfo $taxBasic->getTaxRateCanada(array('province' => 'foo'));
print_r($rateInfo);               // show all properties
echo $rateInfo->GST;              // or just the GST (Goods & Services Tax)

// Query tax rate for Cupertino, CA USA
$rateInfo $taxBasic->getTaxRateUS(array('zip_code' => 95014));
print_r($rateInfo);               // show all properties
echo $rateInfo->state_sales_tax;  // or just the state sales tax

Zend Framework