taxjar/module-taxjar

Magento 2 的 TaxJar 销售税模块

安装次数: 365,814

依赖项: 0

建议者: 0

安全: 0

星级: 22

关注者: 17

分支: 30

开放问题: 17

类型:magento2-module


README

使用 TaxJar 的实时结账计算和基于邮政编码的备份税率来简化您的销售税。

要开始使用,请查看我们的 M2 扩展指南

入门指南

从本存储库下载扩展的 ZIP 文件,或使用以下命令使用 Composer 安装我们的模块:

composer require taxjar/module-taxjar

如果您手动安装扩展,请解压存档,并将文件上传到 /app/code/Taxjar/SalesTax。上传后,运行以下 Magento CLI 命令

bin/magento module:enable Taxjar_SalesTax --clear-static-content
bin/magento setup:upgrade
bin/magento setup:di:compile

这些命令将启用 TaxJar 扩展,执行必要的数据库更新,并重新编译您的 Magento 商店。从那里,您将想要运行预导入清单,并使用我们的 扩展指南 设置一切。

测试

要运行我们的结账计算集成测试,将存储库克隆到您的本地 Magento 2 实例中。您需要有效的 TaxJar API 令牌(最好是测试账户)才能运行这些测试。

git clone https://github.com/taxjar/taxjar-magento2-extension.git app/code/Taxjar/SalesTax

dev/tests/integration 下的现有 phpunit.xml 重命名为 phpunit.xml。将 app/code/Taxjar/SalesTax/Test/Integration 下的 phpunit.xml file 复制到 TaxJar 模块中。

cp app/code/Taxjar/SalesTax/Test/Integration/phpunit.xml dev/tests/integration/phpunit.xml

dev/tests/integration/etc 下的 install-config-mysql.php.dist 重命名为 install-config-mysql.php。确保 Magento 有权限访问 MySQL 数据库以运行集成测试。

Test/Integration/credentials.php.dist 复制到同一目录下的 credentials.php,并添加您的 TaxJar API 令牌。

cp app/code/Taxjar/SalesTax/Test/Integration/credentials.php.dist app/code/Taxjar/SalesTax/Test/Integration/credentials.php

最后,使用 PHPUnit 运行 TaxJar 测试套件。

vendor/bin/phpunit -c ~/OSS/magento2/dev/tests/integration/phpunit.xml --testsuite “Taxjar”

注意,配置标志应包括 phpunit.xml 的完整路径。

许可证

TaxJar 的 Magento 2 模块在 Open Software License 3.0 (OSL-3.0) 下发布。

支持

如果您在我们的扩展中找到错误,请在此处 GitHub 上 新建问题。对于有关 TaxJar 的一般问题或商店的特定问题,请在我们扩展指南查阅后 联系我们