PHP code example of teamzac / zactax-php

1. Go to this page and download the library: Download teamzac/zactax-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

teamzac / zactax-php example snippets


$zactax = new TeamZac\ZacTax\ZacTax([
    'apiToken' => 'YOUR-API-TOKEN-HERE',
    'jurisdictionId' => 'JURISDICTION-ID*',
    'debug' => false, // set to true to debug HTTP calls
]);

$zactax->setApiToken('1234')
    ->setJurisdictionId('jurisdiction-id')
    ->debug();

$zactax->industries;
$zactax->jurisdictions;
$zactax->regions;
$zactax->taxpayers;
$zactax->users;

$resource->all(); // fetch all records
$resource->find($id); // fetch a specific record

$zactax->industries->payments($industryId, $options);
$zactax->industries->topTaxpayers($industryId);

$zactax->regions->payments($regionId, $options);
$zactax->regions->outlets($regionId);

$zactax->taxpayers->payments($taxpayerId, $options);
$zactax->taxpayers->search($query, $options);

$zactax->industries->me();
$zactax->industries->myJurisdictions();

composer