jwohlfert23 / laravel-avalara
This is my package laravel-avalara
Installs: 6 585
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 2
Requires
- php: ^8.3
- guzzlehttp/guzzle: ^7.4|^8.0
- illuminate/contracts: ^11.0|^12.0
- spatie/laravel-package-tools: ^1.9.2
Requires (Dev)
- laravel/pint: ^1.21
- nunomaduro/collision: ^8.0
- orchestra/testbench: ^10.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2025-04-11 00:41:25 UTC
README
We built this client because of problems with the existing SDK provided by Avalara:
- Lack of support for PHP8.
- No transformation of responses to PHP models/objects.
- Avalara only has a 99.5% SLA, and we thought built-in retries for certain endpoints would be helpful.
Installation
You can install the package via composer:
composer require jwohlfert23/laravel-avalara
You should publish the config file:
php artisan vendor:publish --tag="avalara-config"
Usage
$transaction = new CreateTransaction(); $transaction->date = now(); $transaction->type = AvalaraDocType::SALES_ORDER; $transaction->customerCode = 'jack@gmail.com'; $transaction->addresses['ShipFrom'] = new \App\Services\Avalara\Models\AddressModel(); $transaction->addresses['ShipTo'] = new \App\Services\Avalara\Models\AddressModel(); $transaction->lines[] = new CreateLineItem( number: 0, amount: 50.00, quantity: 2, taxCode: 'P0000000' ); return AvalaraClient::createTransaction($transaction); // or return $transaction->create();
License
The MIT License (MIT). Please see License File for more information.