PHP code example of smbear / avatax

1. Go to this page and download the library: Download smbear/avatax 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/ */

    

smbear / avatax example snippets

regexp
array:4 [▼
  "status" => "success"
  "code" => 200
  "message" => "success"
  "data" => array:2 [▼
    "local" => {#352 ▼
      +"id": 6000155272900
      +"code": "FS000000001"
      +"companyId": 2730548
      +"date": "2021-05-31"
      +"paymentDate": "1900-01-01"
      +"status": "Committed"
      +"type": "SalesInvoice"
      +"batchCode": ""
      +"currencyCode": "USD"
      +"exchangeRateCurrencyCode": "USD"
      +"customerUsageType": "123456789"
      +"entityUseCode": "123456789"
      +"customerVendorCode": "123456789"
      +"customerCode": "123456789"
      +"exemptNo": ""
      +"reconciled": false
      +"locationCode": ""
      +"reportingLocationCode": ""
      +"purchaseOrderNo": "FS000000001"
      +"referenceCode": ""
      +"salespersonCode": "123"
      +"taxOverrideType": "None"
      +"taxOverrideAmount": 0.0
      +"taxOverrideReason": ""
      +"totalAmount": 40.8
      +"totalExempt": 40.8
      +"totalDiscount": 0.0
      +"totalTax": 0.0
      +"totalTaxable": 0.0
      +"totalTaxCalculated": 0.0
      +"adjustmentReason": "Other"
      +"adjustmentDescription": "Create or adjust transaction"
      +"locked": false
      +"region": "DE"
      +"country": "US"
      +"version": 3
      +"softwareVersion": "21.5.1.0"
      +"originAddressId": 0
      +"destinationAddressId": 0
      +"exchangeRateEffectiveDate": "2021-05-31"
      +"exchangeRate": 1.0
      +"isSellerImporterOfRecord": false
      +"description": ""
      +"businessIdentificationNo": ""
      +"modifiedDate": "2021-06-01T02:44:29.0497913Z"
      +"modifiedUserId": 1414955
      +"taxDate": "2021-05-31T00:00:00"
      +"lines": array:2 [▶]
      +"addresses": array:1 [▶]
      +"locationTypes": array:2 [▶]
      +"summary": array:1 [▶]
    }
    "delay" => {#365 ▼
      +"id": 7091650277
      +"code": "FS000000001"
      +"companyId": 2730548
      +"date": "2021-05-31"
      +"paymentDate": "1900-01-01"
      +"status": "Committed"
      +"type": "SalesInvoice"
      +"batchCode": ""
      +"currencyCode": "USD"
      +"exchangeRateCurrencyCode": "USD"
      +"customerUsageType": "123456789"
      +"entityUseCode": "123456789"
      +"customerVendorCode": "123456789"
      +"customerCode": "123456789"
      +"exemptNo": ""
      +"reconciled": false
      +"locationCode": ""
      +"reportingLocationCode": ""
      +"purchaseOrderNo": "FS000000001"
      +"referenceCode": ""
      +"salespersonCode": "123"
      +"taxOverrideType": "None"
      +"taxOverrideAmount": 0.0
      +"taxOverrideReason": ""
      +"totalAmount": 40.8
      +"totalExempt": 40.8
      +"totalDiscount": 0.0
      +"totalTax": 0.0
      +"totalTaxable": 0.0
      +"totalTaxCalculated": 0.0
      +"adjustmentReason": "Other"
      +"adjustmentDescription": "Create or adjust transaction"
      +"locked": false
      +"region": "DE"
      +"country": "US"
      +"version": 4
      +"softwareVersion": "21.5.1.0"
      +"originAddressId": 0
      +"destinationAddressId": 0
      +"exchangeRateEffectiveDate": "2021-05-31"
      +"exchangeRate": 1.0
      +"isSellerImporterOfRecord": false
      +"description": ""
      +"businessIdentificationNo": ""
      +"modifiedDate": "2021-06-01T02:44:29.2929873Z"
      +"modifiedUserId": 1414955
      +"taxDate": "2021-05-31T00:00:00"
      +"lines": array:2 [▶]
      +"addresses": array:1 [▶]
      +"locationTypes": array:2 [▶]
      +"summary": array:1 [▶]
    }
  ]
]

php artisan vendor:publish --provider=Smbear\Avatax\AvataxServiceProvider

php artisan migrate