Download the PHP package ejosterberg/module-opensalestax without Composer

On this page you can find all versions of the php package ejosterberg/module-opensalestax. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package module-opensalestax

OpenSalesTax for Magento 2

v0.1.0 alpha. Installable; passes its unit tests; not yet validated against a real Magento storefront. See kickoff/ and specs/ for the build plan.

A free, self-hostable Magento 2 module that swaps Magento's built-in tax calculator for the OpenSalesTax engine on US-destination, USD checkouts. No per-transaction fees, no SaaS lock-in — merchants run both Magento and OpenSalesTax on their own infrastructure.

What this module does

What this module does NOT do

Requirements

Install

Configure

Stores → Configuration → Sales → Tax → OpenSalesTax

Field Path Default Purpose
Engine API URL osstax/general/api_url (empty) Base URL of your OST engine, e.g. https://ost.example.com
API Token (optional) osstax/general/api_token (empty) Bearer token if your engine requires authentication. Stored encrypted in core_config_data.
Fail Hard on Engine Error osstax/general/fail_hard No If Yes, an unreachable engine blocks checkout. If No, the module falls back to Magento's tax tables and logs a warning.

While api_url is empty the module is inert — Magento's built-in tax calc handles everything.

How it works

  1. At checkout, Magento builds the cart totals. The totals pipeline reaches Magento\Quote\Model\Quote\Address\Total\Tax::collect.
  2. Our plugin's beforeCollect checks the gate (configured? USD? shipping to US?). If all three are yes, it builds an OST engine payload from the quote and calls POST /v1/calculate.
  3. The engine returns per-line tax + per-jurisdiction breakdown. We cache this in a request-scoped registry keyed by quote id.
  4. Magento then asks Calculation::getRate for the rate to apply per line. Our plugin reads from the registry and returns the OST-derived effective rate, which Magento applies in the usual way.
  5. Our afterCollect writes the per-jurisdiction breakdown onto the totals object so cart and order screens display individual jurisdictions instead of a single opaque tax line.

If any check fails (non-US, non-USD, engine down without fail-hard), control returns silently to Magento's built-in tax calc.

Logging

All engine interactions log structured metadata (quote id, line count, HTTP status, RTT in milliseconds) via Magento's Psr\Log\LoggerInterface. Customer addresses and full payloads are never logged. The API token is decrypted in memory only at request time and never written to logs.

Development

See CONTRIBUTING.md for branch model, DCO sign-off, and the quality gate.

License

Dual-licensed under your choice of LICENSE.


All versions of module-opensalestax with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
psr/log Version ^1.0 || ^2.0 || ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ejosterberg/module-opensalestax contains the following files

Loading the files please wait ...