composer-php - 如何在 Magento 2 中安装 ingenico 电子支付?
问题描述
我在 magento 2 上安装 ingenico epayments 时遇到问题。文档建议使用 composer ( ingenico doc ) 安装,但在“composer require ingenico/ingenico_epayments_ogn2:3.3.1”之后我无法修复以下错误:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for ingenico/ingenico_epayments_ogn2 3.3.1 -> satisfiable by ingenico/ingenico_epayments_ogn2[3.3.1].
- ingenico/ingenico_epayments_ogn2 3.3.1 requires ingenico/library-ops-m2 ~3.3.0 -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
我还尝试使用 magento 2 安装向导安装该模块。但是“检查 Cron 脚本”和“检查组件依赖性”的就绪检查失败
我确定了存在问题(更新)的 cron,当我手动执行它时,我遇到了这个错误:“/usr/bin/php /var/www/html/update/cron.php”
PHP Warning: require_once(/var/www/html/update/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/update/app/bootstrap.php on line 15
PHP Stack trace:
PHP 1. {main}() /var/www/html/update/cron.php:0
PHP 2. require_once() /var/www/html/update/cron.php:7
PHP Fatal error: require_once(): Failed opening required '/var/www/html/update/vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/html/update/app/bootstrap.php on line 15
PHP Stack trace:
PHP 1. {main}() /var/www/html/update/cron.php:0
PHP 2. require_once() /var/www/html/update/cron.php:7
这是因为供应商文件夹不在更新文件夹中,而是在根目录中。
谢谢你的帮助!
解决方案
使用以下方式安装此模块并使用包含文件夹 zip(库和扩展名)的包
composer config repositories.ingenico artifact /path/to/folder/with/package/
composer require ingenico/ingenico_epayments_ogn2
composer update
推荐阅读
- eclipse - 如何在 Eclipse 的表单编辑器选项卡上显示错误标记图标?
- python - Sklearn中的拟合方法。使用 KNeighborsClassifier 时
- php - 错误:带有时区的时间戳类型的输入语法无效:“09/03/1943 01:00:00 MWT”
- c# - 用于在当前线程上执行代码的 C# 等价的 PostMessage 是什么?
- cmake - QtCreator BareMetal 插件 - 无法激活协议版本:“CMAKE_GENERATOR”已设置但与配置的生成器值不兼容
- kurento - 我没有看到从 Kurento 媒体服务器加载的网页上的视频
- c++ - QMdiSubWindow 关闭后如何删除 QWidget
- android - 使用 Retrofit 将 JSON 对象发布到服务器
- bash - 如何解决这个模棱两可的 Azure 错误?
- c# - Mono 编译器不支持 MySQL 5.5