How to install ingenico epayments in Magento 2? - composer-php

I am having trouble installing ingenico epayments on magento 2.
The documentation advises to install with composer (ingenico doc) but I can not fix the following error after "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.
I also tried to install the module with the magento 2 setup wizard. But the Readiness Check fails for "Check Cron Scripts" and "Check Component Dependency"
I identified the cron that poses problem (update) and when I execute it manually I have this error :
"/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
It's because the vendor folder is not in the update folder but in the root directory.
Thanks for your help!

Install this module using below way and use a package which has both the folders zip(library and extension)
composer config repositories.ingenico artifact /path/to/folder/with/package/
composer require ingenico/ingenico_epayments_ogn2
composer update

Related

laravel old version is not supporting php 8.0.8

I have installed php 8.0.8 on my local computer. Laravel new projects work perfect. But when I try to run Old projects it shows me error. When I try to run command
composer install
It gives me the error below:
Problem 1
- jeremy-dunn/php-fedex-api-wrapper is locked to version 5.0.1 and an update of this package was not requested.
- jeremy-dunn/php-fedex-api-wrapper 5.0.1 requires ext-soap * -> it is missing from your system. Install or enable PHP's soap extension.
To enable extensions, verify that they are enabled in your .ini files:
- C:\xampp\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
When I run:
composer dump-autoload
It shows this error:
Generating optimized autoload files Class App\Http\Controllers\Vendor\OrderController
located in C:/Users/Muhammad Adnan/Downloads/test-upwork-master/spree-retail/app\Http\Controllers\temp\OrderController.php does not comply with psr-4 autoloading standard. Skipping.
Class App\Http\Resources\profile\AddressesResponse located in C:/Users/Muhammad Adnan/Downloads/test-upwork-master/spree-retail/app\Http\Resources\Profile\AddressesResponse.php does not comply with psr-4 autoloading standard. Skipping.
Class Illuminate\Foundation\ComposerScripts is not autoloadable, can not call post-autoload-dump script
> #php artisan package:discover --ansi
Fatal error: Uncaught Error: Class "Illuminate\Foundation\Application" not found in C:\Users\Muhammad Adnan\Downloads\test-upwork-master\spree-retail\bootstrap\app.php:14
Stack trace:
#0 C:\Users\Muhammad Adnan\Downloads\test-upwork-master\spree-retail\artisan(20): require_once()
#1 {main}
thrown in C:\Users\Muhammad Adnan\Downloads\test-upwork-master\spree-retail\bootstrap\app.php on line 14
PHP Fatal error: Uncaught Error: Class "Illuminate\Foundation\Application" not found in C:\Users\Muhammad Adnan\Downloads\test-upwork-master\spree-retail\bootstrap\app.php:14
Stack trace:
#0 C:\Users\Muhammad Adnan\Downloads\test-upwork-master\spree-retail\artisan(20): require_once()
#1 {main}
thrown in C:\Users\Muhammad Adnan\Downloads\test-upwork-master\spree-retail\bootstrap\app.php on line 14
Script #php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255
Unfortunately, older versions of Laravel doesn't not support newer versions of PHP. Laravel 6 is the minimal version for PHP 8.0 support (and it is already pretty old from a web development perspective).
Of course, this is for a fresh installation, you might have code in your project that is also not PHP 8.0 compatible.
About this error:
Problem 1
- jeremy-dunn/php-fedex-api-wrapper is locked to version 5.0.1 and an update of this package was not requested.
- jeremy-dunn/php-fedex-api-wrapper 5.0.1 requires ext-soap * -> it is missing from your system. Install or enable PHP's soap extension.
The problem will be easy to fix, just install the soap extension. You seem on Windows so it should already installed but disabled.
You will have to uncomment ;extension=soap.dll in your php.ini file (or maybe in the ext directory located in your php directory, it depends).
There will probably be other extensions required but disabled, to get a full list execute composer check.
This is what is preventing composer from installing your dependencies (which lead Uncaught Error: Class "Illuminate\Foundation\Application" not found in to when you are calling composer dump-autoload).
I searched out and found a solution regarding this issue. Only single command is the solution
Note: Don't update composer.
composer install --ignore-platform-reqs

Memory exhausted and PHP Version mismatch errors. Not able to install image intervention laravel 5.5 package

I want to change color of my image. So I'm trying to use image/intervention of laravel.
Followed their documentation:
http://image.intervention.io/getting_started/installation
https://packagist.org/packages/intervention/image
When i tried the following, i got an memory exhausted error:
1. composer require intervention/image
Error:
PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
E:\xampp\htdocs\Myproject>php -r "echo ini_get('memory_limit').PHP_EOL;"
512M
So, i followed the below link and increased to memory_limit=-1 from memory_limit=512M
https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors
Now, again tried this command composer require intervention/image. Now i got a different error:
Error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- This package requires php ~7.2.0 but your PHP version (7.3.11) does not satisfy that requirement.
Problem 2
- mpociot/vat-calculator dev-master requires ext-soap * -> the requested PHP extension soap is missing from your system.
- mpociot/vat-calculator dev-master requires ext-soap * -> the requested PHP extension soap is missing from your system.
- mpociot/vat-calculator dev-master requires ext-soap * -> the requested PHP extension soap is missing from your system.
- Installation request for mpociot/vat-calculator dev-master -> satisfiable by mpociot/vat-calculator[dev-master].
To enable extensions, verify that they are enabled in your .ini files:
- E:\xampp\php\php.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
Why am i getting these errors? How can i install image/intervention package in my application?
I'm using laravel 5.5 , PHP 7.3.11
As the error says, do i have to install 7.2.0 php version? Or is there any other solutions?
The first problem come because there is something like "php": "~7.2", in your composer.json. Change to "php": ^7.2" to allow all PHP minor version upper 7.2. Run composer update php to fix composer.lock
The second problem is because you are missing soap extension in PHP. Try to install it. This question/anwser could help you.

Upgrading my Laravel Yajra Table

I'm currently in 7.5.0 and I want to upgrade to 8.0.3, I followed the steps in https://yajrabox.com/docs/laravel-datatables/master/upgrade but I encountered this error
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Updating yajra/laravel-datatables-oracle (v7.5.0 => v8.0.3): Downloading (conneDownloading (100%)
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Yajra\Datatables\DatatablesServiceProvider' not found
Script php artisan optimize handling the post-update-cmd event returned with error code 1
Installation failed, reverting ./composer.json to its original content.
In the Yajra DataTables V8 the Namespace and Facade was updated.
https://yajrabox.com/docs/laravel-datatables/master/upgrade#namespace
https://yajrabox.com/docs/laravel-datatables/master/upgrade#facade
In folder config/app.php, temporarily comment out
Yajra\Datatables\DatatablesServiceProvider.
Run command composer update.
Uncomment the provider Yajra\Datatables\DatatablesServiceProvider.
Done.
To make sure it works, can run again command composer update.
Reference from: https://yajrabox.com/docs/laravel-datatables/master/upgrade#v5-to-v6

how to install package with composer?

I am trying to install a push-notification library for codeigniter using composer fromhere .But when i do run a command it throws this error -> Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for wrep/notificato ^1.2 -> satisfiable by wrep/notificato[1.2.0].
- wrep/notificato 1.2.0 requires ext-sockets * -> the requested PHP extension sockets is missing from your system.
To enable extensions, verify that they are enabled in your .ini files:
- E:\xampp\php\php.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
I also did commented the php.ini extension=php_intl.dll and also its the same error occuring. How can i solve this?

after installation of simple qrcode, blade engine doesnt work on laravel5

After installing illuminate/html, my blade engine was wrrking well. But when I installed simple qrCode via:
"require": {
"simplesoftwareio/simple-qrcode": "~1"
}
I get this error:
Class 'Illuminate\Html\HtmlServiceProvider' not found
the output of terminal after installation, simple qrcode was:
Warning: This development build of composer is over 60 days old. It is recommended to update it by running "/usr/bin/composer self-update" to get the latest version.
Key require is a duplicate in ./composer.json at line 53
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing illuminate/html (v5.0.0)
- Installing bacon/bacon-qr-code (1.0.1)
Downloading: 100%
- Installing simplesoftwareio/simple-qrcode (1.4.3)
Downloading: 100%
Writing lock file
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
PHP Fatal error: Class 'Illuminate\Html\HtmlServiceProvider' not found in /home/farhad/public_html/letterPanel/laravel/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Illuminate\Html\HtmlServiceProvider' not found
Script php artisan optimize handling the post-update-cmd event returned with an error
[RuntimeException]
Error Output: PHP Fatal error: Class 'Illuminate\Html\HtmlServiceProvider' not found in /home/farhad/public_html/letterPanel/laravel/vendor/lara
vel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146
I also ran composer require illuminate/html after this error. But I get that same error.
Your composer.json file has two require keys, as mentioned in the composer error in your question:
Key require is a duplicate in ./composer.json at line 53
Remove to have a correctly formed composer.json file and retry.
You're installing module for Laravel 4 on Laravel 5 project. Html package was removed from Laravel 5.
You can look for another package or you could install Html package and adapt qrcode to work with Laravel 5.
The line "simpleoftwareio / simple-qrcode": "~ 1" must be within "require" that is already in your composer.json.

Resources