首页 > 解决方案 > 如何在 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

这是因为供应商文件夹不在更新文件夹中,而是在根目录中。

谢谢你的帮助!

标签: composer-phpmagento2

解决方案


使用以下方式安装此模块并使用包含文件夹 zip(库和扩展名)的包

composer config repositories.ingenico artifact /path/to/folder/with/package/
composer require ingenico/ingenico_epayments_ogn2
composer update

推荐阅读