payplug / payplug-magento2
为 Magento 2 定制的 Payplug 支付模块
Requires
- php: >=8.1
- giggsey/libphonenumber-for-php: ^8.10
- magento/framework: 102.0.*|103.0.*
- magento/module-checkout: 100.3.*|100.4.*
- magento/module-payment: 100.3.*|100.4.*
- magento/module-sales: 102.0.*|103.0.*
- payplug/payplug-php: ^3.2.0
- dev-master
- 4.0.0
- 3.5.5
- 3.5.4
- 3.5.3
- 3.5.2
- 3.5.1
- 3.5.0
- 3.4.1
- 3.4.0
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.7.0
- 2.6.0
- 2.5.1
- 2.4.0
- 2.3.0
- 2.2.1
- 2.2.0
- 2.0.0
- 1.27.4
- 1.27.3
- 1.27.2
- 1.27.1
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.1
- 1.24.0
- 1.23.1
- 1.23.0
- 1.22.0
- 1.21.2
- 1.21.1
- 1.21.0
- 1.20.1
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.1
- 1.16.0
- 1.14.0
- 1.13.0
- 1.12.0
- 1.10.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.4
- 1.5.2
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- dev-MAG-369
- dev-MAG-362
- dev-develop
- dev-MAG-315
- dev-MAG-310
- dev-qa
- dev-MAG-368
- dev-MAG-316
- dev-MAG-354
- dev-multi-account-test
- dev-dev-new
This package is auto-updated.
Last update: 2024-09-20 14:48:43 UTC
README
安装
通过 Magento 后台办公室安装
您可以根据https://devdocs.magento.com/guides/v2.3/comp-mgr/extens-man/extensman-main-pg.html中提供的 Magento 指示进行操作
通过 composer 安装
Composer
如何获取 Composer: 请遵循https://getcomposer.org.cn/download/上的说明
如何更新您的 Composer 版本: 请遵循https://getcomposer.org.cn/doc/03-cli.md#self-update-selfupdate-上的说明
安装
在 Magento 根目录中运行以下命令
composer require payplug/payplug-magento2 # (*)
composer install
php bin/magento module:enable Payplug_Payments --clear-static-content
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy <languages> # (**)(***)
php bin/magento cache:clean
(*) 如果您在安装 Magento 2 时没有保存它们,此命令将要求您输入 Magento 身份验证密钥 (https://devdocs.magento.com/guides/v2.3/install-gde/prereq/connect-auth.html)。登录 = 公钥 密码 = 私钥
(**) 使用语言选项,您可以定义您想要为哪种语言生成静态内容。语言应以空格分隔。例如,要为 en_US 和 fr_FR 本地化生成内容,您可以运行以下命令
php bin/magento setup:static-content:deploy en_US fr_FR
(***) 如果您不在生产模式下运行,请使用 --force 选项。否则,命令将失败。例如,要为 locales en_US 和 fr_FR 生成内容,您可以运行以下命令
php bin/magento setup:static-content:deploy --force en_US fr_FR # --force # if you are not running on production mode
故障排除
如果在安装过程中遇到缺少类错误消息
[ReflectionException] Class Payplug\Authentication does not exist
这可能是由于未与 Magento 模块一起安装 Payplug PHP 库。如果您没有运行 composer 来安装模块,则可能会发生这种情况。要修复它,您应该使用 composer 请求缺失的依赖项
composer require payplug/payplug-php:^3.0
然后您需要安装另一个库,我们使用它来规范化客户的电话号码
composer require giggsey/libphonenumber-for-php:^8.10
更新 Payplug 支付模块
在 Magento 根目录中运行以下命令
composer require --update-with-all-dependencies payplug/payplug-magento2:VERSION_YOU_WANT_TO_UPDATE_TO # (*)
composer install
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy <languages> # (**)
php bin/magento cache:clean
(*) 要确定 VERSION_YOU_WANT_TO_UPDATE_TO
的值,您可以查看我们的最新发布。例如,您可以运行
composer require --update-with-all-dependencies payplug/payplug-magento2:^1.5
(**) 使用语言选项,您可以定义您想要为哪种语言生成静态内容。语言应以空格分隔。例如,要为 en_US 和 fr_FR 本地化生成内容,您可以运行以下命令
php bin/magento setup:static-content:deploy en_US fr_FR