Giter VIP home page Giter VIP logo

avatax-calc-rest-php's Introduction

AvaTax-REST-PHP

Other Samples

This is a PHP sample demonstrating the AvaTax REST API methods: tax/get POST, tax/get GET, tax/cancel POST, and address/validate GET.

For more information on the use of these methods and the AvaTax product, please visit our developer site or homepage

Dependencies:

  • PHP 5.3 or later (not tested on versions older than PHP 5.3)

Requirements:

  • Authentication requires an valid Account Number and License Key, which should be entered in the test file (e.g. GetTaxTest.php) you would like to run.

  • If you do not have an AvaTax account, a free trial account can be acquired through our developer site

  • Some Windows users have had trouble with cURL automatically using our SSL certificate. The sample code offers two workarounds (both in /AvaTaxClasses/classes/TaxServiceRest.php.class). If this is something that presents a challenge for your system, uncomment ONE of the following two options in that file:

      //Some Windows users have had trouble with our SSL Certificates. Uncomment the following line to NOT use SSL.
      //curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); 		
      
      //Other Windows users may prefer to download the certificate from our site (detail here: ) and manually set the cert path.
      //    To set the path manually, uncomment the following two lines. If you choose to manually set the path, make sure you have commented out the line above 
      //    that tells curl to NOT use SSL.
      //$ca = "C:/curl/curl-ca-bundle.crt";
      //curl_setopt($curl, CURLOPT_CAINFO, $ca);
    
  • If you would like to use these core classes as part of a project and manage your depencies through composer, the Avatax classes can be added to your existing project by adding

    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/avadev/AvaTax-Calc-REST-PHP"
        }
    ],
    "require": {
        "avalara/avatax": "*"
    }

to your composer.json file and run php composer.phar update from your command line.

Contents:

Sample Files
CancelTaxTest.phpDemonstrates the CancelTax method used to void a document.
EstimateTaxTest.phpDemonstrates the EstimateTax method used for product- and line- indifferent tax estimates.
GetTaxTest.phpDemonstrates the GetTax method used for product- and line- specific calculation.
PingTest.phpUses a hardcoded EstimateTax call to test connectivity and credential information.
ValidateAddressTest.phpDemonstrates the ValidateAddress method to normalize an address.
Other Files
AvaTaxClasses/Contains the core classes that make the service calls.
.gitattributes-
.gitignore-
LICENSE.md-
README.md-

avatax-calc-rest-php's People

Contributors

bartkamphuis avatar jwasham avatar seanrustavalara avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.