A set of classes to assist with integration to the Avalara AvaTax SOAP API.
Other Samples, (*1)
This is a PHP sample demonstrating the AvaTax SOAP API. For more information on the use of these methods and the AvaTax product, please visit our developer site or homepage, (*2)
extension=php_soap.dll extension=php_openssl.dll
Note: For *nix, it may be necessary to recompile your PHP interpreter with soap.dll and openssl.dll enabled., (*3)
"repositories": [ { "type": "vcs", "url": "https://github.com/avadev/AvaTax-Calc-SOAP-PHP" } ], "require": { "avalara/avatax": "*" }
to your composer.json file and run php composer.phar update
from your command line., (*4)
File |
Method Demonstrated |
Samples/Credentials.php | contains authentication elements (URL, Account, LicenseKey, Client) that are passed into the ATConfig object which ontains various service configuration parameters as class static variables. |
Samples/IsAuthorizedTest.php | IsAuthorized is a method that allows the user to specify a number of a methods or services to ascertain if they are permitted to use them based on the credentials provided in the request. |
Samples/PingTest.php | The Ping method can be used for testing connectivity to the AvaTax web service, verify supplied credentials, and return the service version in use by the AvaTax web service. |
Samples/ValidateTest.php | Validate demonstrates the ValidateAddress method that normalizes a provided address. US and Canada only. |
Samples/GetTaxRequestTest.php | The GetTaxRequest method calculates retail sales tax on documents such as sales orders, sales invoices, purchase orders, purchase invoices, or credit memos. Note: A document can be committed at this stage by setting the Commit property to true (default is false). |
Samples/PostTaxTest.php | The PostTax method can be used to modify the state of a SalesInvoice, ReturnInvoice or PurchaseInvoice document saved to the AvaTax database. Note: A document can be committed at this stage by setting the Commit property to true (default is false). |
Samples/CommitTaxTest.php | The CommitTax method can be used to modify the state of a document that is "posted" (only) to the AvaTax database via SalesInvoice, ReturnInvoice or PurchaseInvoice a methods. Note: CommitTax is not a required step to commit a document to AvaTax. Documents can be committed during the GetTax or PostTax document lifecycle. |
Samples/GetTaxHistoryTest.php | GetTaxHistory is a method that retrieves details from a previously saved (to the AvaTax database) documents. |
Samples/AdjustTaxTest.php | AdjustTax is a method that has the ability to modify elements of an already committed document. Note: Sets the Document Modified flag. |
Samples/CancelTaxTest.php | CancelTax is a method that cancels a tax document specified by the DocId, DocCode, and DocType parameters. SeeĀ CancelTaxĀ for more details. |
/AvaTax | ../AvaTax is a Directory containing the core classes that enable the API samples to make Avatax web service calls. |
Other Files Included in this Repository |
|
.gitattributes | GitHub attribute file. Not required for sample use. |
.gitignore | GitHub config file. Not required for sample use. |
LICENSE.md | Apache License TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
README.md | This document describing how to make use of the sample API code. |
composer.json | Allows for composer management of packages. |
Developer API Documentation is located here: http://developer.avalara.com/api-docs, (*5)
The Avalara AvaTax API Reference is located here: http://developer.avalara.com/api-docs/avalara-avatax-api-reference, (*6)
Find out what other developers are talking about on the Avalara Developer Community Forum located here: https://community.avalara.com/avalara/category_sets/developers, (*7)
Frequently asked questions regarding the Avalara product is located here: https://help.avalara.com/, (*8)