Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Kansas SOAP Call For Taxes


Recommended Posts

I through together a quick example of using Kansas's SOAP call to get tax rates based on Zip (Zip+4, Address). I am not sure I could build an addon for osC but maybe someone else can put this to use.



$wsdl = "sstp.wsdl";
$client = new SoapClient($wsdl);

// var_dump($client->__getFunctions());
// var_dump($client->__gettypes());

$ReturnData = $client->GetFIPSBy5ZipOnly(66612,"2008-01-28");

//echo $ReturnData->strReturnShortDesc;
//echo $ReturnData->strConfirmationNum;
//foreach ($ReturnData->FIPSRecordList as &$FipsRecord) {
//	echo $FipsRecord->strGeneralTaxRateIntrastate;



	 A Small Hello 
  <H1>Streamlined Sales Example</H1><br />
  <br />
  Return Code: <?php echo $ReturnData->intReturnCode ?><br />
  Return Short Description: <?php echo $ReturnData->strReturnShortDesc ?><br />
  Confirmation Number: <?php echo $ReturnData->strConfirmationNum ?><br />
  Time Stamp: <?php echo $ReturnData->strEventTimeStamp ?><br />
<table width="700px">
	<td>Juris Type</td>
	<td>FIPS Code</td>
	<td>General Intrastate Rate</td>
	<td>General Interstate Rate</td>
	<td>Food/Drug Intrastate Rate</td>
	<td>Food/Drug Interstate Rate</td>
<?php foreach ($ReturnData->FIPSRecordList as &$FipsRecord) { ?>
	<td><?php echo $FipsRecord->intState ?></td>
	<td><?php echo $FipsRecord->strJurisdictionType ?></td>
	<td><?php echo $FipsRecord->strCompositeSER ?></td>
	<td><?php echo $FipsRecord->intJurisdictionFIPS ?></td>
	<td><?php echo $FipsRecord->strGeneralTaxRateIntrastate ?></td>
	<td><?php echo $FipsRecord->strGeneralTaxRateInterstate ?></td>
	<td><?php echo $FipsRecord->strFoodDrugTaxRateIntrastate ?></td>
	<td><?php echo $FipsRecord->strFoodDrugTaxRateInterstate ?></td>
<?php } ?>	

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...